-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTextFieldList.stories.ts
74 lines (69 loc) · 1.71 KB
/
TextFieldList.stories.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// eslint-disable-next-line import/no-extraneous-dependencies
import { Story } from '@storybook/vue'
export default {
title: 'TextFieldList',
argTypes: {
text: {
type: {
name: 'string',
required: false,
},
defaultValue: '',
description: 'text of button',
table: {
type: {
summary: 'string',
},
defaultValue: {
summary: '',
},
},
control: {
type: 'text',
},
},
placeholder: {
type: {
name: 'string',
required: false,
},
defaultValue: '',
description: 'placehoder of TextField',
table: {
type: {
summary: 'string',
},
defaultValue: {
summary: '',
},
},
control: {
type: 'text',
},
},
},
}
const PrependTemplate = `
<template #prepend>
<Button preset="tertiary" size="small" prepend-class="mr-[6px]" append-class="ml-0" >
<template #prepend>
<IconPlaceholder />
</template>
<template #append>
<IconArrowDown />
</template>
</Button>
</template>`
const Template: Story = (_args: any, { argTypes, parameters }: any) => ({
props: Object.keys(argTypes),
template: `
<TextFieldList v-bind="$props">
${parameters.prepend ? PrependTemplate : ''}
</TextFieldList>
`,
})
export const Default = Template.bind({})
Default.args = { text: 'Add', textPreset:'h6', labelTag:'div', placeholder: 'say something' }
export const Prepend = Template.bind({})
Prepend.args = { text: 'Wallet Address', textPreset:'h6', labelTag:'div', placeholder: 'Wallet address..' }
Prepend.parameters = { prepend: true }