mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Add participation to /profil and various improvements
This commit is contained in:
@@ -2,17 +2,23 @@ import { FC, ReactNode } from "react"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
type Props = {
|
||||
type?: "grey"
|
||||
children: ReactNode
|
||||
onClick?: () => void | undefined
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
const FormButton: FC<Props> = ({ children, onClick }): JSX.Element => (
|
||||
<button type="button" className={styles.button} onClick={onClick}>
|
||||
const FormButton: FC<Props> = ({ type, children, onClick }): JSX.Element => (
|
||||
<button
|
||||
type="button"
|
||||
className={type === "grey" ? styles.greyButton : styles.button}
|
||||
onClick={onClick}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
|
||||
FormButton.defaultProps = {
|
||||
type: undefined,
|
||||
onClick: undefined,
|
||||
}
|
||||
|
||||
|
@@ -3,3 +3,6 @@
|
||||
.button {
|
||||
@include form-button;
|
||||
}
|
||||
.greyButton {
|
||||
@include form-grey-button;
|
||||
}
|
||||
|
Reference in New Issue
Block a user