diff --git a/client/src/components/Modal/index.tsx b/client/src/components/Modal/index.tsx index 5d3ef3e2..49722c73 100644 --- a/client/src/components/Modal/index.tsx +++ b/client/src/components/Modal/index.tsx @@ -15,7 +15,7 @@ export default function Modal() { <> {type !== ModalType.CLOSE && (
-
+
@@ -37,7 +37,7 @@ export default function Modal() {
-
+
{IS_CONFIRM_MODAL ? ( <> void; @@ -10,26 +13,27 @@ interface IType { const CONTENT = { check: { content: '확인', - className: - 'inline-flex w-full justify-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto', + color: 'yellow', }, yes: { content: '예', - className: - 'inline-flex w-full justify-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto', + color: 'yellow', }, cancle: { content: '취소', - className: - 'inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto', + color: 'yellow_line', }, }; export default function ModalButton({ type, onClick }: IType) { - const { content, className } = CONTENT[type]; + const { content, color } = CONTENT[type] as { + content: string; + color: ButtonColorType; + }; const handdleKeyup = (e: KeyboardEvent) => { - if ((e.keyCode === 13 || e.keyCode === 27) && type !== 'cancle') { + const key = e.key || e.keyCode; + if ((key === 13 || key === 27) && type !== 'cancle') { onClick(); } }; @@ -39,8 +43,8 @@ export default function ModalButton({ type, onClick }: IType) { return () => document.removeEventListener('keyup', handdleKeyup); }, []); return ( - + ); } diff --git a/client/src/components/Modal/modal-icon.tsx b/client/src/components/Modal/modal-icon.tsx index e65ab4f5..0524c980 100644 --- a/client/src/components/Modal/modal-icon.tsx +++ b/client/src/components/Modal/modal-icon.tsx @@ -14,7 +14,7 @@ export default function ModalIcon({ type }: IType) {
- +
); } diff --git a/client/src/components/base/Button/index.tsx b/client/src/components/base/Button/index.tsx index 36a2dd7a..607215d0 100644 --- a/client/src/components/base/Button/index.tsx +++ b/client/src/components/base/Button/index.tsx @@ -31,7 +31,7 @@ export default function Button(props: ButtonProps) { return (