Skip to content

Commit c7100bb

Browse files
fix(button-icon): add assistive text to LBC Mismatch example (#5030)
* fix(button-icon): add assistive text to LBC Mismatch example * fix(button-icon): update assistive text * fix(button-icon): revert release note * fix(button-icon): refactor with ButtonIcon comp * fix(modals): LBC examples * Revert "fix(modals): LBC examples" This reverts commit 1d9c4d199fae38968a9261efef2b4516f66c0dfd. Co-authored-by: Kim Flournoy <[email protected]>
1 parent 58ec56b commit c7100bb

File tree

2 files changed

+46
-58
lines changed

2 files changed

+46
-58
lines changed

ui/components/button-icons/base/example.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ export let examples = [
6161
)
6262
},
6363
{
64+
// this was put in to place to test a styling hooks edge case
6465
id: 'button-icon-lbc-mismatch',
6566
label: 'Button Icon - LBC Mismatch',
6667
element: (
6768
<Button className="slds-button_icon slds-button_icon-border">
69+
<span className="slds-assistive-text">Error</span>
6870
<SvgIcon
6971
sprite="utility"
7072
symbol="clock"

ui/components/button-icons/sizing/example.jsx

Lines changed: 44 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license
33

44
import React from 'react';
5-
import {Button} from '../../buttons/base/example';
6-
import SvgIcon from '../../../shared/svg-icon';
5+
import ButtonIcon from '../';
76

87
export default [
98
{
109
id: 'default',
11-
label: 'Button Icon – Default',
10+
label: 'Bare – Default',
1211
element: (
13-
<Button className="slds-button slds-button_icon" title="More Options">
14-
<SvgIcon
15-
sprite="utility"
16-
symbol="settings"
17-
className="slds-button__icon"
18-
/>
19-
</Button>
12+
<ButtonIcon
13+
assistiveText="More options"
14+
title="More options"
15+
/>
2016
)
2117
}
2218
];
@@ -26,91 +22,81 @@ export let examples = [
2622
id: 'button-icon-large',
2723
label: 'Bare - Size Large',
2824
element: (
29-
<Button className="slds-button slds-button_icon" title="More Options">
30-
<SvgIcon
31-
sprite="utility"
32-
symbol="settings"
33-
className="slds-button__icon slds-button__icon_large"
34-
/>
35-
</Button>
25+
<ButtonIcon
26+
iconClassName="slds-button__icon_large"
27+
assistiveText="More options"
28+
title="More options"
29+
/>
3630
)
3731
},
3832
{
3933
id: 'button-icon-small',
4034
label: 'Bare - Size Small',
4135
element: (
42-
<Button className="slds-button slds-button_icon" title="More Options">
43-
<SvgIcon
44-
sprite="utility"
45-
symbol="settings"
46-
className="slds-button__icon slds-button__icon_small"
36+
<ButtonIcon
37+
iconClassName="slds-button__icon_small"
38+
assistiveText="More options"
39+
title="More options"
4740
/>
48-
</Button>
4941
)
5042
},
5143
{
5244
id: 'button-icon-x-small',
5345
label: 'Bare - Size Extra Small',
5446
element: (
55-
<Button className="slds-button slds-button_icon" title="More Options">
56-
<SvgIcon
57-
sprite="utility"
58-
symbol="settings"
59-
className="slds-button__icon slds-button__icon_x-small"
60-
/>
61-
</Button>
47+
<ButtonIcon
48+
iconClassName="slds-button__icon_x-small"
49+
assistiveText="More options"
50+
title="More options"
51+
/>
6252
)
6353
},
6454
{
6555
id: 'button-icon-contained-large',
6656
label: 'Contained - Size Large',
6757
element: (
68-
<Button className="slds-button slds-button_icon slds-button_icon-border slds-button_icon-large" title="More Options">
69-
<SvgIcon
70-
sprite="utility"
71-
symbol="settings"
72-
className="slds-button__icon"
73-
/>
74-
</Button>
58+
<ButtonIcon
59+
className="slds-button_icon-border"
60+
size="large"
61+
assistiveText="More options"
62+
title="More options"
63+
/>
7564
)
7665
},
7766
{
7867
id: 'button-icon-contained-small',
7968
label: 'Contained - Size Small',
8069
element: (
81-
<Button className="slds-button slds-button_icon slds-button_icon-border slds-button_icon-small" title="More Options">
82-
<SvgIcon
83-
sprite="utility"
84-
symbol="settings"
85-
className="slds-button__icon"
86-
/>
87-
</Button>
70+
<ButtonIcon
71+
className="slds-button_icon-border"
72+
size="small"
73+
assistiveText="More options"
74+
title="More options"
75+
/>
8876
)
8977
},
9078
{
9179
id: 'button-icon-contained-x-small',
9280
label: 'Contained - Size Extra Small',
9381
element: (
94-
<Button className="slds-button slds-button_icon slds-button_icon-border slds-button_icon-x-small" title="More Options">
95-
<SvgIcon
96-
sprite="utility"
97-
symbol="settings"
98-
className="slds-button__icon"
99-
/>
100-
</Button>
82+
<ButtonIcon
83+
className="slds-button_icon-border"
84+
size="x-small"
85+
assistiveText="More options"
86+
title="More options"
87+
/>
10188
)
10289
},
10390
{
10491
id: 'button-icon-contained-xx-small',
10592
label: 'Contained - Size Extra Extra Small',
10693
element: (
107-
<Button className="slds-button slds-button_icon slds-button_icon-border slds-button_icon-xx-small" title="More Options">
108-
<SvgIcon
109-
sprite="utility"
110-
symbol="settings"
111-
className="slds-button__icon"
112-
/>
113-
</Button>
94+
<ButtonIcon
95+
className="slds-button_icon-border"
96+
size="xx-small"
97+
assistiveText="More options"
98+
title="More options"
99+
/>
114100
)
115101
}
116102
];

0 commit comments

Comments
 (0)