Skip to content

Commit 098085f

Browse files
authored
combobox add element name for list item child (#4348)
* feat(combobox): add element name for list item child * feat(combobox): add changeset
1 parent 3705495 commit 098085f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@twilio-paste/combobox": patch
3+
"@twilio-paste/core": patch
4+
---
5+
6+
[Combobx] add element name for Combobox List Item child

packages/paste-core/components/combobox/src/styles/ComboboxListboxOption.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ const ComboboxListboxOption = React.forwardRef<HTMLLIElement, ComboboxListboxOpt
127127
backgroundColor={getBackgroundColor(highlighted, selected)}
128128
paddingY="space40"
129129
transition="background-color 150ms ease, color 150ms ease"
130+
element={`${element}_LIST_ITEM_CHILD`}
130131
{...VariantStyles[variant]}
131132
>
132133
<Box as="span">

packages/paste-core/components/combobox/stories/Combobox-customization.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const ShowCustomization: React.FC<React.PropsWithChildren<{ isTestEnvironment: b
4848
COMBOBOX_GROUPNAME: { fontFamily: "fontFamilyText", cursor: "help" },
4949
COMBOBOX_GROUPNAME_TEXT: { fontWeight: "fontWeightLight" },
5050
COMBOBOX_LIST_ITEM: { backgroundColor: "colorBackgroundPrimaryStrong" },
51+
COMBOBOX_LIST_ITEM_CHILD: { backgroundColor: "colorBackgroundPrimary" },
5152
COMBOBOX_LIST_ITEM_TEXT: { color: "colorTextWeakest", fontWeight: "fontWeightBold" },
5253
HELP_TEXT: { color: "colorTextWarningStrong" },
5354
COMBOBOX_PREFIX: { backgroundColor: "colorBackgroundRequired", borderRadius: "borderRadius20" },
@@ -71,6 +72,7 @@ const ShowCustomization: React.FC<React.PropsWithChildren<{ isTestEnvironment: b
7172
FOO_GROUPNAME: { fontFamily: "fontFamilyText", cursor: "help" },
7273
FOO_GROUPNAME_TEXT: { fontWeight: "fontWeightLight" },
7374
FOO_LIST_ITEM: { backgroundColor: "colorBackgroundPrimaryStrong" },
75+
FOO_LIST_ITEM_CHILD: { backgroundColor: "colorBackgroundPrimary" },
7476
FOO_LIST_ITEM_TEXT: { color: "colorTextWeakest", fontWeight: "fontWeightBold" },
7577
HELP_TEXT: { color: "colorTextWarningStrong" },
7678
FOO_PREFIX: { backgroundColor: "colorBackgroundRequired", borderRadius: "borderRadius20" },

0 commit comments

Comments
 (0)