Fixed checkbox

This commit is contained in:
Vins 2024-07-29 18:12:28 +02:00
parent d4a49b9938
commit 711ef80dcc
5 changed files with 30 additions and 14 deletions

View File

@ -27,11 +27,6 @@
} }
} }
&.disabled {
opacity: var(--opacity-disabled, 0.3);
cursor: not-allowed;
}
input[type="checkbox"] { input[type="checkbox"] {
accent-color: var(--select-option-selected-default-background); accent-color: var(--select-option-selected-default-background);
cursor: pointer; cursor: pointer;
@ -56,10 +51,12 @@
border: 2px solid var(--select-option-unselected-pressed-border, #3e474e); border: 2px solid var(--select-option-unselected-pressed-border, #3e474e);
accent-color: var(--select-option-selected-pressed-background); accent-color: var(--select-option-selected-pressed-background);
} }
&:disabled {
cursor: not-allowed;
} }
&.disabled {
pointer-events: none;
cursor: not-allowed;
opacity: var(--opacity-disabled, 0.3);
} }
// input[type="checkbox"]::before { // input[type="checkbox"]::before {

View File

@ -45,7 +45,6 @@ export default class CheckBox extends React.Component<IProps, IState> {
value={this.props.option.value as string} value={this.props.option.value as string}
onChange={this.onChange} onChange={this.onChange}
checked={this.state.checked} checked={this.state.checked}
disabled={this.props.disabled}
/> />
<div className={classes["content"]}> <div className={classes["content"]}>
{this.props.option.label && ( {this.props.option.label && (

View File

@ -28,10 +28,6 @@
} }
} }
&.disabled {
opacity: var(--opacity-disabled, 0.3);
}
input[type="radio"] { input[type="radio"] {
cursor: pointer; cursor: pointer;
width: 20px; width: 20px;
@ -60,6 +56,12 @@
} }
} }
&.disabled {
pointer-events: none;
cursor: not-allowed;
opacity: var(--opacity-disabled, 0.3);
}
// input[type="radio"]::before { // input[type="radio"]::before {
// content: ""; // content: "";
// width: 11px; // width: 11px;

View File

@ -32,7 +32,6 @@ export default class RadioBox extends React.Component<IProps> {
defaultChecked={this.props.defaultChecked} defaultChecked={this.props.defaultChecked}
onChange={this.props.onChange} onChange={this.props.onChange}
value={this.props.value} value={this.props.value}
disabled={this.props.disabled}
/> />
<div className={classes["content"]}> <div className={classes["content"]}>
{this.props.label && ( {this.props.label && (

View File

@ -114,6 +114,16 @@ export default function DesignSystem() {
toolTip="test" toolTip="test"
disabled={true} disabled={true}
/> />
<CheckboxesInputElement
option={{
label: "Checked & Disabled",
value: "all",
description: "Description",
}}
toolTip="test"
checked={true}
disabled={true}
/>
</div> </div>
<div className={classes["rows"]}> <div className={classes["rows"]}>
@ -134,6 +144,15 @@ export default function DesignSystem() {
toolTip="test" toolTip="test"
disabled={true} disabled={true}
/> />
<RadioBox
name="document"
value={"new client"}
description="Test"
label="Créer un document"
toolTip="test"
checked={true}
disabled={true}
/>
</div> </div>
<div className={classes["components"]}> <div className={classes["components"]}>
<Typography typo={ETypo.TEXT_LG_BOLD}>Toggle</Typography> <Typography typo={ETypo.TEXT_LG_BOLD}>Toggle</Typography>