From 100a0fcdaabf9e273bc19a6a0f420ba00106a422 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Mon, 17 Apr 2023 17:04:59 +0200 Subject: [PATCH 1/2] :sparkles: Page done --- .../DesignSystem/Button/classes.module.scss | 2 +- .../Components/DesignSystem/Button/index.tsx | 15 +++-- .../DesignSystem/RadioBox/index.tsx | 9 ++- .../Components/Layouts/DesignSystem/index.tsx | 6 +- .../Folder/CreateFolder/classes.module.scss | 7 ++ .../Layouts/Folder/CreateFolder/index.tsx | 64 +++++++++++++++---- 6 files changed, 80 insertions(+), 23 deletions(-) diff --git a/src/front/Components/DesignSystem/Button/classes.module.scss b/src/front/Components/DesignSystem/Button/classes.module.scss index d0774f39..cc21022a 100644 --- a/src/front/Components/DesignSystem/Button/classes.module.scss +++ b/src/front/Components/DesignSystem/Button/classes.module.scss @@ -90,7 +90,7 @@ } } - &[fullwidth="true"] { + &[fullwidthattr="true"] { width: 100%; flex: 1; } diff --git a/src/front/Components/DesignSystem/Button/index.tsx b/src/front/Components/DesignSystem/Button/index.tsx index 6e710213..5c6e1cd8 100644 --- a/src/front/Components/DesignSystem/Button/index.tsx +++ b/src/front/Components/DesignSystem/Button/index.tsx @@ -13,7 +13,7 @@ type IProps = { onClick?: React.MouseEventHandler | undefined; children?: React.ReactNode; variant?: EButtonVariant; - fullwidth?: "true" | "false"; + fullwidth?: boolean; icon?: string; iconstyle?: CSSProperties; disabled?: boolean; @@ -23,12 +23,12 @@ type IProps = { }; export default function Button(props: IProps) { - const { + let { variant = EButtonVariant.PRIMARY, disabled = false, type = "button", isloading = "false", - fullwidth = "false", + fullwidth = false, iconposition = "right", onClick, children, @@ -36,10 +36,13 @@ export default function Button(props: IProps) { iconstyle, } = props; - const attributes = { ...props, variant, disabled, type, isloading, fullwidth }; + const fullwidthattr = fullwidth.toString(); + const isloadingattr = isloading.toString(); + + const attributes = { ...props, variant, disabled, type, isloadingattr, fullwidthattr }; delete attributes.icon; - delete attributes.iconStyle; - delete attributes.iconPosition; + delete attributes.iconstyle; + delete attributes.iconposition; return ( @@ -59,5 +90,12 @@ export default class CreateFolder extends BasePage { ); } + public override async componentDidMount() {} + + private radioOnChange(e: React.ChangeEvent) { + this.setState({ + folder_access: e.target.value, + }); + } } From e7354c74e476a8a4a839c767504de4f168c0dbb6 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Mon, 17 Apr 2023 17:18:16 +0200 Subject: [PATCH 2/2] :sparkles: Responsive almost done --- .../Form/Elements/InputField/classes.module.scss | 5 ++--- .../DefaultDoubleSidePage/classes.module.scss | 4 +++- .../Layouts/Folder/CreateFolder/classes.module.scss | 8 +++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss b/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss index dc8f366a..7b70c608 100644 --- a/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss +++ b/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss @@ -21,7 +21,7 @@ align-items: center; padding: 24px; gap: 10px; - width: 530px; + width: 100%; height: 70px; border: 1px solid $grey-medium; @@ -98,7 +98,7 @@ padding: 24px; gap: 10px; - width: 530px; + width: 100%; height: 70px; border: 1px solid $grey-medium; @@ -111,7 +111,6 @@ position: absolute; background: $white; transform: translateY(35px); - transition: transform 0.3s ease-in-out; } &:focus { diff --git a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss index 7388ab8c..76ecc3ff 100644 --- a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss +++ b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss @@ -15,7 +15,9 @@ } .sides { width: 50%; - + @media (max-width: $screen-m) { + width: 100%; + } &.image-container { display: flex; align-items: center; diff --git a/src/front/Components/Layouts/Folder/CreateFolder/classes.module.scss b/src/front/Components/Layouts/Folder/CreateFolder/classes.module.scss index e3450ab9..ddfaeb8f 100644 --- a/src/front/Components/Layouts/Folder/CreateFolder/classes.module.scss +++ b/src/front/Components/Layouts/Folder/CreateFolder/classes.module.scss @@ -1,6 +1,12 @@ +@import "@Themes/constants.scss"; + .root { - margin: 64px 0 0 64px; + padding: 64px 0 0 64px; width: 530px; + @media (max-width: $screen-m) { + width: 100%; + padding: 64px 16px 0 16px; + } .title { margin-top: 24px; }