Skip to content

Commit fc0079e

Browse files
ktaborssnowystingerLFDanLu
authored
Menu Items - Improving disabled Item 'description' css specificity (#4530)
* improving description specificity in menus * Update packages/@adobe/spectrum-css-temp/components/menu/skin.css Co-authored-by: Robert Snow <[email protected]> --------- Co-authored-by: Robert Snow <[email protected]> Co-authored-by: Daniel Lu <[email protected]>
1 parent 1f3dbd5 commit fc0079e

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

packages/@adobe/spectrum-css-temp/components/menu/skin.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ governing permissions and limitations under the License.
5252
}
5353

5454
&.is-disabled {
55+
.spectrum-Menu-description {
56+
color: var(--spectrum-selectlist-option-text-color-disabled);
57+
}
5558
background-color: var(--spectrum-selectlist-option-background-color-disabled);
5659
background-image: none;
5760
color: var(--spectrum-selectlist-option-text-color-disabled);

packages/@react-spectrum/listbox/stories/ListBox.stories.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -667,36 +667,38 @@ export const WithSemanticElementsStatic = {
667667
flexGrow={1}
668668
aria-labelledby="label"
669669
selectionMode="multiple"
670+
disabledKeys={['paste', 'floof']}
670671
onSelectionChange={action('onSelectionChange')}>
671672
<Section title="Section 1">
672-
<Item textValue="Copy">
673+
<Item key="copy" textValue="Copy">
673674
<Copy size="S" />
674675
<Text>Copy</Text>
675676
</Item>
676-
<Item textValue="Cut">
677+
<Item key="cut" textValue="Cut">
677678
<Cut size="S" />
678679
<Text>Cut</Text>
679680
</Item>
680-
<Item textValue="Paste">
681+
<Item key="paste" textValue="Paste">
681682
<Paste size="S" />
682683
<Text>Paste</Text>
683684
</Item>
684685
</Section>
685686
<Section title="Section 2">
686-
<Item textValue="Puppy">
687+
<Item key="puppy" textValue="Puppy">
687688
<AlignLeft size="S" />
688689
<Text>Puppy</Text>
689690
<Text slot="description">Puppy description super long as well geez</Text>
690691
</Item>
691-
<Item textValue="Doggo with really really really long long long text">
692-
<AlignCenter size="S" />
693-
<Text>Doggo with really really really long long long text</Text>
694-
</Item>
695-
<Item textValue="Floof">
692+
<Item key="floof" textValue="Floof">
696693
<AlignRight size="S" />
697694
<Text>Floof</Text>
695+
<Text slot="description">Floof medium description</Text>
696+
</Item>
697+
<Item key="doggo" textValue="Doggo with really really really long long long text">
698+
<AlignCenter size="S" />
699+
<Text>Doggo with really really really long long long text</Text>
698700
</Item>
699-
<Item>Basic Item</Item>
701+
<Item key="basic">Basic Item</Item>
700702
</Section>
701703
</ListBox>
702704
),

0 commit comments

Comments
 (0)