extends React.Component
{ + constructor(props: P) { + super(props); + this.close = this.close.bind(this); + + (this.state as any) = { + isOpen: props.isOpen ?? true, + }; + } + + public override render(): JSX.Element | null { + if (!this.state.isOpen) return null; + + return ( +
): void { + if (prevProps.isOpen !== this.props.isOpen) { + this.setState({ + isOpen: this.props.isOpen, + }); + } + } + + protected close() { + this.setState({ + isOpen: false, + }); + this.props.onClose?.(); + } +} diff --git a/src/front/components/DesignSystem/Typography/classes.module.scss b/src/front/components/DesignSystem/Typography/classes.module.scss index 92927e8b..380f2115 100644 --- a/src/front/components/DesignSystem/Typography/classes.module.scss +++ b/src/front/components/DesignSystem/Typography/classes.module.scss @@ -1,31 +1,37 @@ @import "@Themes/constants.scss"; @import "@Themes/modes.scss"; + .root { color: $black; + font-family: 'Inter', sans-serif; &.H1-60 { font-style: normal; font-weight: 500; font-size: 50px; line-height: 61px; } + &.H1-bis-40 { font-style: normal; font-weight: 500; font-size: 40px; line-height: 48px; } + &.H2-30 { font-style: normal; font-weight: 500; font-size: 30px; line-height: 36px; } + &.H3-24 { font-style: normal; font-weight: 600; font-size: 24px; line-height: 29px; } + &.Paragraphe-semibold-18 { font-style: normal; font-weight: 600; @@ -33,12 +39,14 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-simple-18 { font-style: normal; font-weight: 400; font-size: 18px; line-height: 22px; } + &.Paragraphe-MAJ-18 { font-style: normal; font-weight: 400; @@ -46,6 +54,7 @@ line-height: 22px; text-transform: uppercase; } + &.Nav-header-off-18 { font-style: normal; font-weight: 400; @@ -53,6 +62,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-18-error { font-style: normal; font-weight: 400; @@ -60,6 +70,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-semibold-16 { font-style: normal; font-weight: 600; @@ -67,6 +78,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Nav-input-off-16 { font-style: normal; font-weight: 400; @@ -75,6 +87,15 @@ letter-spacing: 0.5px; color: $grey; } + + &.Paragraphe-simple-16 { + font-style: normal; + font-weight: 400; + font-size: 16px; + line-height: 22px; + letter-spacing: 0.005em + } + &.Paragraphe-16-error { color: $re-hover; font-style: normal; @@ -83,6 +104,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Caption_14 { font-style: normal; font-weight: 400; @@ -98,4 +120,4 @@ &.grey { color: $grey; } -} +} \ No newline at end of file diff --git a/src/front/components/Elements/Modal/classes.module.scss b/src/front/components/Elements/Modal/classes.module.scss deleted file mode 100644 index c063b777..00000000 --- a/src/front/components/Elements/Modal/classes.module.scss +++ /dev/null @@ -1,33 +0,0 @@ -@import "@Themes/constants.scss"; -@import "@Themes/animation.scss"; - - -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: black; - opacity: 0.5; - -} - -.root { - border-radius: 6px; - background: $backgroundColor2; - box-shadow: 0 1px 10px $shadowColor; - position: absolute; - left: 0; - right: 0; - top: 150px; - margin: auto; - width: 600px; - max-width: 90vw; - padding: 20px; - - .title { - text-align: center; - - } -} \ No newline at end of file diff --git a/src/front/components/Elements/Modal/index.tsx b/src/front/components/Elements/Modal/index.tsx deleted file mode 100644 index d78a85f4..00000000 --- a/src/front/components/Elements/Modal/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import classes from "./classes.module.scss" - -type IProps = { - title: string, - children: JSX.Element, -} - -export default function Modal(props: IProps) { - return (<> -
-