diff --git a/public/sprite.svg b/public/sprite.svg index 8fc540e2..3af5a39e 100644 --- a/public/sprite.svg +++ b/public/sprite.svg @@ -38,6 +38,10 @@ + + + + @@ -166,10 +170,14 @@ + + + + diff --git a/public/spriteIcons/minus-hover.svg b/public/spriteIcons/minus-hover.svg index 40a1ec38..55dd6d72 100644 --- a/public/spriteIcons/minus-hover.svg +++ b/public/spriteIcons/minus-hover.svg @@ -1,6 +1,14 @@ + + + + + + + + diff --git a/src/app/write/components/Counter/Counter.tsx b/src/app/write/components/Counter/Counter.tsx index ef3b9d38..4708d51b 100644 --- a/src/app/write/components/Counter/Counter.tsx +++ b/src/app/write/components/Counter/Counter.tsx @@ -23,9 +23,9 @@ const Counter = ({ control, name, min = 2, max = 20, ...rest }: CounterProps ( <> - + - + )} /> diff --git a/src/app/write/components/Form/FirstStep.tsx b/src/app/write/components/Form/FirstStep.tsx index 52d44ed7..e839af55 100644 --- a/src/app/write/components/Form/FirstStep.tsx +++ b/src/app/write/components/Form/FirstStep.tsx @@ -19,6 +19,7 @@ const FirstStep = ({ nextStep }: stepProps) => { const { stepOne, setData } = useFormStore(); const method = useForm({ + mode: 'onSubmit', resolver: zodResolver(stepOneSchema), defaultValues: stepOne || {}, }); diff --git a/src/components/IconButton/IconButton.tsx b/src/components/IconButton/IconButton.tsx index 21f42e35..8bc74022 100644 --- a/src/components/IconButton/IconButton.tsx +++ b/src/components/IconButton/IconButton.tsx @@ -42,9 +42,13 @@ const IconButton = ({ useEffect(() => { if (!error) return; - setStatus(error ? ICON_STATUS.ERROR : disabled ? ICON_STATUS.DISABLE : ICON_STATUS.DEFAULT); + setStatus(error ? ICON_STATUS.ERROR : ICON_STATUS.DEFAULT); }, [error, disabled]); + useEffect(() => { + setStatus(disabled ? ICON_STATUS.DISABLE : ICON_STATUS.DEFAULT); + }, [disabled]); + const handleMouseEnter = () => { if (error || disabled || status === ICON_STATUS.ACTIVE) return; hover && setStatus(ICON_STATUS.HOVER); diff --git a/src/components/SvgIcon/SvgIcon.tsx b/src/components/SvgIcon/SvgIcon.tsx index 1d04df61..39d519e1 100644 --- a/src/components/SvgIcon/SvgIcon.tsx +++ b/src/components/SvgIcon/SvgIcon.tsx @@ -1,16 +1,16 @@ import { SVGProps } from 'react'; interface Props extends SVGProps { - /** icon id (spriteIcons 폴더하에 있는 svg 파일명과 동일함) */ - id: string; + /** icon id (spriteIcons 폴더하에 있는 svg 파일명과 동일함) */ + id: string; } const SvgIcon = ({ id, width = 16, height = 16, fill = 'none', ...rest }: Props) => { - return ( - - - - ); + return ( + + + + ); }; export default SvgIcon;