mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
various UI improvments
This commit is contained in:
19
src/components/Form/FormButton/FormButton.tsx
Normal file
19
src/components/Form/FormButton/FormButton.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { FC, ReactNode } from "react"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
type Props = {
|
||||
children: ReactNode
|
||||
onClick?: () => void | undefined
|
||||
}
|
||||
|
||||
const FormButton: FC<Props> = ({ children, onClick }): JSX.Element => (
|
||||
<button type="button" className={styles.button} onClick={onClick}>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
|
||||
FormButton.defaultProps = {
|
||||
onClick: undefined,
|
||||
}
|
||||
|
||||
export default FormButton
|
5
src/components/Form/FormButton/styles.module.scss
Normal file
5
src/components/Form/FormButton/styles.module.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
@import "../../../theme/mixins";
|
||||
|
||||
.button {
|
||||
@include form-button;
|
||||
}
|
14
src/components/Form/FormSubmit/FormSubmit.tsx
Normal file
14
src/components/Form/FormSubmit/FormSubmit.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { FC, ReactNode } from "react"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
type Props = {
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
const FormSubmit: FC<Props> = ({ children }): JSX.Element => (
|
||||
<button type="submit" className={styles.button}>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
|
||||
export default FormSubmit
|
5
src/components/Form/FormSubmit/styles.module.scss
Normal file
5
src/components/Form/FormSubmit/styles.module.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
@import "../../../theme/mixins";
|
||||
|
||||
.button {
|
||||
@include form-button;
|
||||
}
|
Reference in New Issue
Block a user