|
1 |
| -import { defineComponent } from 'vue' |
2 |
| -import VaChip from './VaChip.demo.vue' |
| 1 | +import { VaCheckbox } from '../va-checkbox' |
| 2 | +import { VaChip } from './' |
3 | 3 |
|
4 | 4 | export default {
|
5 | 5 | title: 'VaChip',
|
6 | 6 | component: VaChip,
|
| 7 | + tags: ['autodocs'], |
7 | 8 | }
|
8 | 9 |
|
9 |
| -export const Default = defineComponent({ |
| 10 | +export const Default = () => ({ |
10 | 11 | components: { VaChip },
|
11 |
| - template: '<VaChip/>', |
| 12 | + template: '<VaChip>text</VaChip>', |
| 13 | +}) |
| 14 | + |
| 15 | +export const Color = () => ({ |
| 16 | + components: { VaChip }, |
| 17 | + template: '<VaChip color="warning">text</VaChip>', |
| 18 | +}) |
| 19 | + |
| 20 | +export const Outline = () => ({ |
| 21 | + components: { VaChip }, |
| 22 | + template: '<VaChip outline>text</VaChip>', |
| 23 | +}) |
| 24 | + |
| 25 | +export const Flat = () => ({ |
| 26 | + components: { VaChip }, |
| 27 | + template: '<VaChip flat>text</VaChip>', |
| 28 | +}) |
| 29 | + |
| 30 | +export const Size = () => ({ |
| 31 | + components: { VaChip }, |
| 32 | + template: ` |
| 33 | + <p>[small]</p> |
| 34 | + <VaChip size="small">text</VaChip> |
| 35 | + <p>[medium]</p> |
| 36 | + <VaChip>text</VaChip> |
| 37 | + <p>[large]</p> |
| 38 | + <VaChip size="large">text</VaChip> |
| 39 | + `, |
| 40 | +}) |
| 41 | + |
| 42 | +export const Icon = () => ({ |
| 43 | + components: { VaChip }, |
| 44 | + template: '<VaChip icon="face">text</VaChip>', |
| 45 | +}) |
| 46 | + |
| 47 | +export const SizesWithIcons = () => ({ |
| 48 | + components: { VaChip }, |
| 49 | + template: ` |
| 50 | + <p>[small]</p> |
| 51 | + <VaChip icon="face" size="small">text</VaChip> |
| 52 | + <p>[medium]</p> |
| 53 | + <VaChip icon="face">text</VaChip> |
| 54 | + <p>[large]</p> |
| 55 | + <VaChip icon="face" size="large">text</VaChip> |
| 56 | + `, |
| 57 | +}) |
| 58 | + |
| 59 | +export const Square = () => ({ |
| 60 | + components: { VaChip }, |
| 61 | + template: '<VaChip square>text</VaChip>', |
| 62 | +}) |
| 63 | + |
| 64 | +export const Closeable = () => ({ |
| 65 | + components: { VaChip, VaCheckbox }, |
| 66 | + data: () => ({ value: true }), |
| 67 | + template: ` |
| 68 | + <VaCheckbox v-model="value" label="toggle" /> |
| 69 | + <br> |
| 70 | + <VaChip v-model="value" closeable>text</VaChip> |
| 71 | + `, |
| 72 | +}) |
| 73 | + |
| 74 | +export const Link = () => ({ |
| 75 | + components: { VaChip }, |
| 76 | + template: '<VaChip to="/?path=/docs/vachip--docs">text</VaChip>', |
| 77 | +}) |
| 78 | + |
| 79 | +export const Disabled = () => ({ |
| 80 | + components: { VaChip }, |
| 81 | + template: '<VaChip disabled>text</VaChip>', |
| 82 | +}) |
| 83 | + |
| 84 | +export const Readonly = () => ({ |
| 85 | + components: { VaChip }, |
| 86 | + template: '<VaChip readonly>text</VaChip>', |
| 87 | +}) |
| 88 | + |
| 89 | +export const Stateful = () => ({ |
| 90 | + components: { VaChip }, |
| 91 | + template: '<VaChip stateful closeable>text</VaChip>', |
| 92 | +}) |
| 93 | + |
| 94 | +export const Shadow = () => ({ |
| 95 | + components: { VaChip }, |
| 96 | + template: '<VaChip shadow>text</VaChip>', |
12 | 97 | })
|
0 commit comments