Skip to content

Commit

Permalink
Fix button css
Browse files Browse the repository at this point in the history
  • Loading branch information
ZendeAditya committed Jan 12, 2025
1 parent 6cb306c commit 71e6959
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode, useEffect } from 'react';
import styles from '@/components/Modal/modal.module.scss';

import { RxCross2 } from 'react-icons/rx';
interface ModalType {
children?: ReactNode;
isOpen: boolean;
Expand All @@ -20,7 +20,7 @@ export default function Modal(props: ModalType) {
return () => {
document.removeEventListener('keydown', handleKeyDown);
};
}, [props]);
}, [props.toggle]);

return (
<>
Expand All @@ -39,7 +39,7 @@ export default function Modal(props: ModalType) {
className={styles.closeButton}
onClick={props.toggle}
>
close
<RxCross2 size={20} />
</button>
{props.children}
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/components/Modal/modal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
right: 10px;
cursor: pointer;
z-index: 999;
padding: 4px 25px;
padding: 4px 10px;
border-radius: 3px;
background-color: $theme-primary-light;
color: $off-white;
&:hover {
background: #041187;
color: white;
background-color: $theme-primary;
color: $white;
}
}

0 comments on commit 71e6959

Please sign in to comment.