mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 18:51:32 +10:00
replace select by single input
This commit is contained in:
@ -7,17 +7,9 @@ import ModalEvents from '../../constants/ModalEvents';
|
|||||||
import { getFieldProps } from '../../utils';
|
import { getFieldProps } from '../../utils';
|
||||||
import DataModal from '../DataModal';
|
import DataModal from '../DataModal';
|
||||||
|
|
||||||
const SKILL_LEVELS = [
|
|
||||||
'Fundamental Awareness',
|
|
||||||
'Novice',
|
|
||||||
'Intermediate',
|
|
||||||
'Advanced',
|
|
||||||
'Expert',
|
|
||||||
];
|
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
name: '',
|
name: '',
|
||||||
level: SKILL_LEVELS[0],
|
level: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
const SkillModal = () => {
|
const SkillModal = () => {
|
||||||
@ -25,9 +17,7 @@ const SkillModal = () => {
|
|||||||
|
|
||||||
const schema = Yup.object().shape({
|
const schema = Yup.object().shape({
|
||||||
name: Yup.string().required(t('shared.forms.validation.required')),
|
name: Yup.string().required(t('shared.forms.validation.required')),
|
||||||
level: Yup.string()
|
level: Yup.string().required(t('shared.forms.validation.required')),
|
||||||
.oneOf(SKILL_LEVELS)
|
|
||||||
.required(t('shared.forms.validation.required')),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -51,8 +41,7 @@ const SkillModal = () => {
|
|||||||
|
|
||||||
<Input
|
<Input
|
||||||
label={t('builder.skills.level')}
|
label={t('builder.skills.level')}
|
||||||
type="dropdown"
|
placeholder="Fundamental Awareness"
|
||||||
options={SKILL_LEVELS}
|
|
||||||
{...getFieldProps(formik, schema, 'level')}
|
{...getFieldProps(formik, schema, 'level')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user