Skip to content

Commit 40a8f87

Browse files
committed
Improve disabled states for Checkbox & Input
1 parent 394cd75 commit 40a8f87

File tree

4 files changed

+182
-172
lines changed

4 files changed

+182
-172
lines changed

src/Checkbox/Checkbox.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ const Template: ComponentStory<typeof CheckboxComponent> = (args: CheckboxProps)
1313
export const Checkbox = Template.bind({});
1414
Checkbox.args = {
1515
label: "Text",
16+
disabled: false,
1617
};

src/Checkbox/style/Checkbox.module.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
&:not(:disabled) {
42-
&:focus {
42+
&:focus-visible {
4343
outline: 1px solid var(--color-border);
4444
outline-offset: 3px;
4545
}
@@ -50,6 +50,14 @@
5050
color: var(--container-disabled);
5151
cursor: default;
5252
background-color: var(--color-input-disabled);
53+
border-color: var(--color-border-soft);
54+
55+
&:checked {
56+
&::before {
57+
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
58+
box-shadow: inset 1em 1em var(--color-border-soft);
59+
}
60+
}
5361
}
5462
}
5563
}

src/Input/Input.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@ Dropdown.args = {
135135
"Option III": { value: "3" },
136136
"Option IV": { value: "4" },
137137
"Option V": { value: "5" },
138-
"Option V": { value: "required", required: true },
138+
"Option VI": { value: "required", required: true },
139139
},
140140
};

0 commit comments

Comments
 (0)