Skip to content

Commit 2114fc6

Browse files
committed
feat(FilterPicker): add more stories and minor fixes
1 parent 13fc5a9 commit 2114fc6

File tree

5 files changed

+647
-185
lines changed

5 files changed

+647
-185
lines changed

src/components/actions/Menu/styled.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export const StyledDivider = tasty({
5252
export const StyledHeader = tasty(Space, {
5353
qa: 'Header',
5454
as: 'div',
55+
role: 'heading',
56+
'aria-level': 3,
5557
styles: {
5658
color: '#dark-02',
5759
preset: 't3',
@@ -68,6 +70,7 @@ export const StyledHeader = tasty(Space, {
6870
export const StyledFooter = tasty(Space, {
6971
qa: 'Footer',
7072
as: 'div',
73+
role: 'footer',
7174
styles: {
7275
color: '#dark-02',
7376
preset: 't3',

src/components/content/Tag/Tag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function Tag(allProps: CubeTagProps, ref) {
123123
{isClosable ? (
124124
<Suffix outerGap="0">
125125
<CloseAction styles={closeButtonStyles} onPress={onClose}>
126-
<CloseIcon size={12} />
126+
<CloseIcon size={12} stroke={3} />
127127
</CloseAction>
128128
</Suffix>
129129
) : undefined}

src/components/fields/FilterListBox/FilterListBox.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ const SearchInputElement = tasty({
8686
},
8787
});
8888

89+
const StyledHeaderWithoutBorder = tasty(StyledHeader, {
90+
styles: {
91+
border: false,
92+
},
93+
});
94+
8995
export interface CubeFilterListBoxProps<T>
9096
extends Omit<CubeListBoxProps<T>, 'children'>,
9197
FieldBaseProps {
@@ -783,12 +789,9 @@ export const FilterListBox = forwardRef(function FilterListBox<
783789
{...focusProps}
784790
>
785791
{header ? (
786-
<StyledHeader
787-
role="presentation"
788-
styles={{ border: false, ...headerStyles }}
789-
>
792+
<StyledHeaderWithoutBorder role="presentation" styles={headerStyles}>
790793
{header}
791-
</StyledHeader>
794+
</StyledHeaderWithoutBorder>
792795
) : (
793796
<div role="presentation" />
794797
)}
@@ -822,8 +825,6 @@ export const FilterListBox = forwardRef(function FilterListBox<
822825
shouldUseVirtualFocus={true}
823826
footer={footer}
824827
footerStyles={footerStyles}
825-
header={header}
826-
headerStyles={headerStyles}
827828
mods={mods}
828829
isCheckable={isCheckable}
829830
onSelectionChange={handleSelectionChange}

0 commit comments

Comments
 (0)