You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Warn about accessibility issues when button has no accessible label
235
-
useWarn(!children&&icon&&!specifiedLabel,{
236
-
key: ['button-icon-no-label',!!icon],
300
+
useWarn(!children&&hasLeftSlot&&!specifiedLabel,{
301
+
key: ['button-icon-no-label',hasLeftSlot],
237
302
args: [
238
303
'accessibility issue:',
239
304
'If you provide `icon` property for a Button and do not provide any children then you should specify the `aria-label` property to make sure the Button element stays accessible.',
Copy file name to clipboardExpand all lines: src/components/content/Item/Item.stories.tsx
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,13 @@ export default {
36
36
},
37
37
icon: {
38
38
control: {type: null},
39
-
description: 'Icon element rendered before the content',
39
+
description:
40
+
'Icon rendered before the content. Can be: ReactNode, `"checkbox"`, `true` (empty slot), or function `({ selected, loading, ...mods }) => ReactNode | true`',
40
41
},
41
42
rightIcon: {
42
43
control: {type: null},
43
-
description: 'Icon element rendered after the content',
44
+
description:
45
+
'Icon rendered after the content. Can be: ReactNode, `true` (empty slot), or function `({ selected, loading, ...mods }) => ReactNode | true`',
0 commit comments