Add participation to /profil and various improvements

This commit is contained in:
pikiou
2022-03-18 04:05:17 +01:00
parent 60b7824011
commit f65963d91c
23 changed files with 282 additions and 117 deletions

View File

@@ -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,
}

View File

@@ -3,3 +3,6 @@
.button {
@include form-button;
}
.greyButton {
@include form-grey-button;
}