@@ -8,8 +8,7 @@ import FormControlInfo from "@components/form-control-info.md";
88import IconsInfo from " @components/icons-info.md" ;
99
1010import Imports from " @components/examples/button/Imports.astro" ;
11- import CustomizedStyles from ' @components/examples/button/CustomizedStyles.astro' ;
12- import CustomIcon from ' @components/examples/button/CustomIcon.astro' ;
11+ import CustomIcon from " @components/examples/button/CustomIcon.astro" ;
1312
1413<Imports />
1514<PageSwitcher />
@@ -53,54 +52,47 @@ import CustomIcon from '@components/examples/button/CustomIcon.astro';
5352<IconsInfo />
5453
5554<Demo >
56- <vscode-button icon = " account" icon-after = " chevron-right" >Icons</vscode-button >
55+ <vscode-button icon = " account" icon-after = " chevron-right" >
56+ Icons
57+ </vscode-button >
5758 <Fragment slot = " html" >
5859 ``` html 'icon="account"' 'icon-after="chevron-right"'
59- <vscode-button icon =" account" icon-after =" chevron-right" >Icons</vscode-button >
60+ <vscode-button icon =" account" icon-after =" chevron-right" >
61+ Icons
62+ </vscode-button >
6063 ```
6164 </Fragment >
6265</Demo >
6366
6467## Icon button
6568
69+ If the button only displays a built-in icon, it will automatically have a square shape.
70+
71+ Provide a ` title ` or ` aria-label ` attribute for accessibility.
72+
6673<Demo >
6774 <vscode-button icon = " settings-gear" title = " Settings" ></vscode-button >
6875 <Fragment slot = " html" >
69- ``` html 'icon="account"' 'icon-after="chevron-right "'
76+ ``` html 'icon="settings-gear "'
7077 <vscode-button icon =" settings-gear" title =" Settings" ></vscode-button >
7178 ```
7279 </Fragment >
7380</Demo >
7481
7582## Custom icons
7683
77- <Demo >
78- <CustomIcon />
79- </Demo >
80-
81- ## Customized styles
84+ Any HTML or SVG markup can be used as an icon. You can use the ` iconOnly ` property
85+ to make it square.
8286
83- Styles can be tweaked .
87+ Provide a ` title ` or ` aria-label ` attribute for accessibility .
8488
8589<Demo >
86- <CustomizedStyles />
90+ <CustomIcon />
8791 <Fragment slot = " html" >
8892 ``` html
89- <vscode-button class =" settings-button-example" >Add item</vscode-button >
90- <vscode-button class =" scm-button-example" icon =" check" >Commit</vscode-button >
91- ```
92- </Fragment >
93- <Fragment slot = " css" >
94- ``` css
95- .settings-button-example {
96- line-height : 18px ;
97- padding : 2px 14px ;
98- }
99-
100- .scm-button-example {
101- line-height : 26px ;
102- width : 179px ;
103- }
93+ <vscode-button icon-only secondary title =" HTML5" >
94+ <img src =" /icons/html.svg" width =" 16" height =" 16" alt =" HTML 5 icon" />
95+ </vscode-button >
10496 ```
10597 </Fragment >
10698</Demo >
0 commit comments