Skip to content

Commit a15e8e2

Browse files
authored
[KLAR-11652] Grey out disabled select button (#669)
1 parent 9d5da4a commit a15e8e2

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nordcloud/gnui",
33
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
4-
"version": "9.1.0",
4+
"version": "9.1.1",
55
"license": "MIT",
66
"repository": {
77
"type": "git",

src/components/select/Select.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ https://react-select.com/props
1515
<Story of={SelectStories.Basic} />
1616
</Canvas>
1717

18+
## Basic Select
19+
20+
<Canvas>
21+
<Story of={SelectStories.Disabled} />
22+
</Canvas>
23+
1824
## Multiselect
1925

2026
<Canvas>

src/components/select/Select.stories.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,37 @@ export const Basic: StoryObj = {
4040
name: "basic",
4141
};
4242

43+
export const Disabled: StoryObj = {
44+
render: () => {
45+
const options = [
46+
{
47+
value: "chocolate",
48+
label: "Chocolate",
49+
},
50+
{
51+
value: "strawberry",
52+
label: "Strawberry",
53+
},
54+
{
55+
value: "vanilla",
56+
label: "Vanilla",
57+
},
58+
];
59+
60+
return (
61+
<div
62+
style={{
63+
height: "150px",
64+
}}
65+
>
66+
<Select isDisabled options={options} />
67+
</div>
68+
);
69+
},
70+
71+
name: "disabled",
72+
};
73+
4374
export const Multiselect: StoryObj = {
4475
render: () => {
4576
const options = [

src/components/select/Select.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const SelectContainer = styled.div`
2222
border: 1px solid ${theme.color.border.focus};
2323
outline: none;
2424
}
25+
&--is-disabled {
26+
background: ${theme.color.interactive.disabled};
27+
}
2528
}
2629
}
2730
&__value-container {

0 commit comments

Comments
 (0)