diff --git a/src/front/Components/DesignSystem/CheckBox/classes.module.scss b/src/front/Components/DesignSystem/CheckBox/classes.module.scss index aa5931a3..42530455 100644 --- a/src/front/Components/DesignSystem/CheckBox/classes.module.scss +++ b/src/front/Components/DesignSystem/CheckBox/classes.module.scss @@ -4,6 +4,9 @@ cursor: pointer; display: flex; align-items: center; + &.disabled { + cursor: not-allowed; + } input[type="checkbox"] { appearance: none; @@ -15,6 +18,10 @@ margin-right: 16px; display: grid; place-content: center; + + &:disabled { + cursor: not-allowed; + } } input[type="checkbox"]::before { diff --git a/src/front/Components/DesignSystem/CheckBox/index.tsx b/src/front/Components/DesignSystem/CheckBox/index.tsx index 4935ca95..3e7b30d6 100644 --- a/src/front/Components/DesignSystem/CheckBox/index.tsx +++ b/src/front/Components/DesignSystem/CheckBox/index.tsx @@ -4,6 +4,7 @@ import { IOption } from "../Form/SelectField"; import Tooltip from "../ToolTip"; import Typography, { ITypo, ITypoColor } from "../Typography"; import classes from "./classes.module.scss"; +import classNames from "classnames"; type IProps = { name?: string; @@ -11,6 +12,7 @@ type IProps = { toolTip?: string; onChange?: (e: React.ChangeEvent) => void; checked: boolean; + disabled?: boolean; }; type IState = { @@ -21,6 +23,7 @@ export default class CheckBox extends React.Component { static defaultProps = { toolTip: "", checked: false, + disabled: false, }; constructor(props: IProps) { @@ -35,13 +38,14 @@ export default class CheckBox extends React.Component { public override render(): JSX.Element { return ( -