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, + }); + } }