Accept className

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2025-12-07 01:17:12 +01:00
parent d2e95744b8
commit e1fee3dd82
+2 -2
View File
@@ -1,6 +1,6 @@
import styles from "./button.module.css";
const Button = ({ children, variant = "primary", onClick }) => {
const Button = ({ children, variant = "primary", onClick, className }) => {
let btnStyle;
if (variant === "primary") btnStyle = styles.primary;
@@ -8,7 +8,7 @@ const Button = ({ children, variant = "primary", onClick }) => {
else if(variant === "transparent") btnStyle = styles.transparent;
else btnStyle = styles.default;
return <div className={`${styles.btn} ${btnStyle}`} onClick={onClick}>
return <div className={`${styles.btn} ${btnStyle} ${className}`} onClick={onClick}>
{children}
</div>;
};