- refactor sections

- combine resume and metadata contexts
This commit is contained in:
Amruth Pillai
2020-07-09 19:18:04 +05:30
parent c00d7a9eef
commit 3b252476c4
41 changed files with 309 additions and 235 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import cx from 'classnames';
import { get, isFunction } from 'lodash';
import { isFunction } from 'lodash';
import React, { memo, useEffect, useState } from 'react';
import { FaAngleDown } from 'react-icons/fa';
import { MdClose } from 'react-icons/md';
@@ -26,14 +26,14 @@ const Input = ({
type = 'text',
}) => {
const [uuid, setUuid] = useState(null);
const stateValue = useSelector((state) => get(state, path));
const stateValue = useSelector(path, '');
const dispatch = useDispatch();
useEffect(() => {
setUuid(uuidv4());
}, []);
value = isFunction(onChange) ? value : stateValue;
value = path ? stateValue : value;
onChange = isFunction(onChange)
? onChange
: (e) => {
+7 -1
View File
@@ -14,10 +14,16 @@
@apply text-primary opacity-50;
}
.container label input:hover,
.container label textarea:hover,
.container label select:hover {
@apply outline-none border-secondary-dark;
}
.container label input:focus,
.container label textarea:focus,
.container label select:focus {
@apply outline-none border-gray-500;
@apply outline-none border-primary;
}
.container label > p {
@@ -3,4 +3,14 @@
height: 60px;
flex: 0 0 60px;
@apply flex items-center justify-center cursor-pointer bg-secondary text-secondary-dark rounded-full;
@apply transition-opacity duration-200 ease-in-out;
}
.circle:focus {
@apply outline-none;
}
.circle:hover {
@apply opacity-75;
@apply transition-opacity duration-200 ease-in-out;
}
+2 -2
View File
@@ -19,9 +19,9 @@ const SectionIcon = ({ section, containerId, tooltipPlacement }) => {
duration={500}
containerId={containerId}
activeClass="text-primary"
className="py-2 cursor-pointer focus:outline-none focus:text-primary hover:text-primary"
className="py-2 cursor-pointer focus:outline-none focus:text-primary hover:text-primary animate__animated animate__fadeIn"
>
<Icon size="16px" />
<Icon size="18px" />
</Link>
</Tooltip>
);