File tree Expand file tree Collapse file tree 10 files changed +152
-3
lines changed Expand file tree Collapse file tree 10 files changed +152
-3
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ const expanded = ref(false)
3636.vp-Example {
3737 margin-top : var (--space-4 );
3838 margin-bottom : var (--space-6 );
39- border : 1px solid var (--gray-a4 );
39+ border : 1px solid var (--gray-a5 );
4040 border-radius : var (--radius-4 );
4141 overflow : hidden ;
4242}
4343.vp-ExampleComponent {
44- border-bottom : 1px solid var (--gray-a4 );
44+ border-bottom : 1px solid var (--gray-a5 );
4545 width : 100% ;
4646 box-sizing : border-box ;
4747}
@@ -97,7 +97,7 @@ const expanded = ref(false)
9797.vp-ExampleAction {
9898 width : 100% ;
9999 font-size : 13px ;
100- border-top : 1px solid var (--gray-a4 );
100+ border-top : 1px solid var (--gray-a5 );
101101 background : var (--gray-2 );
102102 color : var (--gray-11 );
103103 padding : var (--space-1 );
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ export default defineConfig({
2626 } ,
2727 themeConfig : {
2828 // https://vitepress.dev/reference/default-theme-config
29+ outline : [ 2 , 3 ] ,
30+
2931 nav : [
3032 { text : 'Home' , link : '/' } ,
3133 { text : 'Components' , link : '/components/button' }
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ title: Button
33description : Trigger an action or event, such as submitting a form or displaying a dialog.
44---
55
6+ <Example name =" button/Overview.vue " />
7+
8+ ## API Reference
9+
610<PropsTable name =" Button " />
711
812## Examples
@@ -18,3 +22,23 @@ Use the `size` prop to control the size of the button.
1822Use the ` variant ` prop to control the visual style of the button.
1923
2024<Example name =" button/Variant.vue " />
25+
26+ #### Disabled
27+
28+ <Example name =" button/Disabled.vue " />
29+
30+ #### Ghost
31+
32+ <Example name =" button/Ghost.vue " />
33+
34+ ### Color
35+
36+ <Example name =" button/Color.vue " />
37+
38+ ### High Contrast
39+
40+ <Example name =" button/HighContrast.vue " />
41+
42+ ### Radius
43+
44+ <Example name =" button/Radius.vue " />
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex items-center gap-2" >
7+ <Button color =" indigo" variant =" soft" >Edit profile</Button >
8+ <Button color =" cyan" variant =" soft" >Edit profile</Button >
9+ <Button color =" orange" variant =" soft" >Edit profile</Button >
10+ <Button color =" crimson" variant =" soft" >Edit profile</Button >
11+ </div >
12+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex items-center gap-2" >
7+ <Button variant =" classic" disabled >
8+ Edit profile
9+ </Button >
10+ <Button variant =" solid" disabled >
11+ Edit profile
12+ </Button >
13+ <Button variant =" soft" disabled >
14+ Edit profile
15+ </Button >
16+ <Button variant =" surface" disabled >
17+ Edit profile
18+ </Button >
19+ <Button variant =" outline" disabled >
20+ Edit profile
21+ </Button >
22+ </div >
23+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex items-center gap-2" >
7+ <Button variant =" ghost" >Edit profile</Button >
8+ <Button variant =" ghost" disabled >Edit profile</Button >
9+ </div >
10+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex flex-col gap-3" >
7+ <div class =" flex items-center gap-2" >
8+ <Button color =" gray" variant =" classic" >
9+ Edit profile
10+ </Button >
11+ <Button color =" gray" variant =" solid" >
12+ Edit profile
13+ </Button >
14+ <Button color =" gray" variant =" soft" >
15+ Edit profile
16+ </Button >
17+ <Button color =" gray" variant =" surface" >
18+ Edit profile
19+ </Button >
20+ <Button color =" gray" variant =" outline" >
21+ Edit profile
22+ </Button >
23+ </div >
24+ <div class =" flex items-center gap-2" >
25+ <Button color =" gray" variant =" classic" high-contrast >
26+ Edit profile
27+ </Button >
28+ <Button color =" gray" variant =" solid" high-contrast >
29+ Edit profile
30+ </Button >
31+ <Button color =" gray" variant =" soft" high-contrast >
32+ Edit profile
33+ </Button >
34+ <Button color =" gray" variant =" surface" high-contrast >
35+ Edit profile
36+ </Button >
37+ <Button color =" gray" variant =" outline" high-contrast >
38+ Edit profile
39+ </Button >
40+ </div >
41+ </div >
42+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button , Icon } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex items-center gap-2" >
7+ <Button >
8+ <Icon icon =" lucide:bookmark" />
9+ Bookmark
10+ </Button >
11+ </div >
12+ </template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { Button } from ' #components'
3+ </script >
4+
5+ <template >
6+ <div class =" flex items-center gap-2" >
7+ <Button radius =" none" variant =" soft" >
8+ Edit profile
9+ </Button >
10+ <Button radius =" small" variant =" soft" >
11+ Edit profile
12+ </Button >
13+ <Button radius =" medium" variant =" soft" >
14+ Edit profile
15+ </Button >
16+ <Button radius =" large" variant =" soft" >
17+ Edit profile
18+ </Button >
19+ <Button radius =" full" variant =" soft" >
20+ Edit profile
21+ </Button >
22+ </div >
23+ </template >
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ const resetClass = computed(() => {
5757 :data-accent-color =" props.color"
5858 :data-radius =" props.radius"
5959 :data-disabled =" props.disabled ? true : undefined"
60+ :disabled =" props.disabled && props.as === 'button' ? true : undefined"
6061 >
6162 <slot ></slot >
6263 </Primitive >
You can’t perform that action at this time.
0 commit comments