@@ -5,9 +5,9 @@ title: Button
55import Demo from " @components/Demo.astro" ;
66import PageSwitcher from " @components/PageSwitcher.astro" ;
77import FormControlInfo from " @components/form-control-info.md" ;
8+ import IconsInfo from " @components/icons-info.md" ;
89
910import Imports from " @components/examples/button/Imports.astro" ;
10- import BasicExample from ' @components/examples/button/BasicExample.astro' ;
1111import CustomizedStyles from ' @components/examples/button/CustomizedStyles.astro' ;
1212
1313<Imports />
@@ -17,29 +17,45 @@ import CustomizedStyles from '@components/examples/button/CustomizedStyles.astro
1717## Basic example
1818
1919<Demo >
20- <BasicExample / >
20+ <vscode-button >Button</ vscode-button >
2121 <Fragment slot = " html" >
2222 ``` html
23- <vscode-button id =" button-1" >Button</vscode-button >
24- <vscode-button id =" button-2" secondary >Secondary button</vscode-button >
25- <vscode-button id =" button-3" disabled >Disabled button</vscode-button >
26- <vscode-button id =" button-4" icon =" account" icon-after =" chevron-right" >Icons</vscode-button >
23+ <vscode-button >Button</vscode-button >
2724 ```
2825 </Fragment >
29- <Fragment slot = " js" >
30- ``` javascript
31- document .getElementById (' button-1' ).addEventListener (' click' , (ev ) => {
32- console .log (ev);
33- });
34- document .getElementById (' button-2' ).addEventListener (' click' , (ev ) => {
35- console .log (ev);
36- });
37- document .getElementById (' button-3' ).addEventListener (' click' , (ev ) => {
38- console .log (ev);
39- });
40- document .getElementById (' button-4' ).addEventListener (' click' , (ev ) => {
41- console .log (ev);
42- });
26+ </Demo >
27+
28+ ## Secondary button
29+
30+ <Demo >
31+ <vscode-button secondary >Secondary button</vscode-button >
32+ <Fragment slot = " html" >
33+ ``` html "secondary"
34+ <vscode-button secondary >Secondary button</vscode-button >
35+ ```
36+ </Fragment >
37+ </Demo >
38+
39+ ## Disabled button
40+
41+ <Demo >
42+ <vscode-button disabled >Disabled button</vscode-button >
43+ <Fragment slot = " html" >
44+ ``` html "disabled"
45+ <vscode-button disabled >Disabled button</vscode-button >
46+ ```
47+ </Fragment >
48+ </Demo >
49+
50+ ## Icons
51+
52+ <IconsInfo />
53+
54+ <Demo >
55+ <vscode-button icon = " account" icon-after = " chevron-right" >Icons</vscode-button >
56+ <Fragment slot = " html" >
57+ ``` html 'icon="account"' 'icon-after="chevron-right"'
58+ <vscode-button icon =" account" icon-after =" chevron-right" >Icons</vscode-button >
4359 ```
4460 </Fragment >
4561</Demo >
0 commit comments