Skip to content

Commit

Permalink
Apply CloseButton styling to button wrapping SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelaenlle committed Feb 7, 2025
1 parent 44ee9c1 commit a0f585e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
8 changes: 8 additions & 0 deletions components/CloseButton/CloseButton.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.button {
display: flex;
justify-content: center;
align-items: center;
padding: 5px;
margin-left: -5px; // To align the button with the other content
}

.button:hover {
cursor: pointer;
}
26 changes: 13 additions & 13 deletions components/CloseButton/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import styles from "./CloseButton.module.scss";

const CloseButton = ({ handleClose }: { handleClose: () => void }) => {
return (
<svg
className={styles.button}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 40 40"
width="3rem"
height="3rem"
onClick={handleClose}
>
<path
fill="#000000"
d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"
></path>
</svg>
<button className={styles.button} onClick={handleClose}>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24px 24px"
width="24px"
height="24px"
>
<path
fill="#000000"
d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"
></path>
</svg>
</button>
);
};

Expand Down

0 comments on commit a0f585e

Please sign in to comment.