Skip to content

Commit 5704e5e

Browse files
committed
.
1 parent 596dde2 commit 5704e5e

5 files changed

Lines changed: 24 additions & 74 deletions

File tree

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
2323

2424
steps:
25-
- name: Checkout
25+
- name: ☑️ Checkout
2626
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727
with:
2828
fetch-depth: 0

app/components/Button/Base.stories.ts

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,93 +9,52 @@ export default meta
99
type Story = StoryObj<typeof meta>
1010

1111
export const Primary: Story = {
12-
args: {},
13-
render: args => ({
14-
components: { Component },
15-
setup() {
16-
return { args }
17-
},
18-
template: '<Component v-bind="args">Primary Button</Component>',
19-
}),
12+
args: {
13+
default: 'Primary Button',
14+
},
2015
}
2116

2217
export const Secondary: Story = {
2318
args: {
19+
default: 'Secondary Button',
2420
variant: 'secondary',
2521
},
26-
render: args => ({
27-
components: { Component },
28-
setup() {
29-
return { args }
30-
},
31-
template: '<Component v-bind="args">Secondary Button</Component>',
32-
}),
3322
}
3423

3524
export const Small: Story = {
3625
args: {
37-
variant: 'secondary',
26+
default: 'Small Button',
3827
size: 'small',
28+
variant: 'secondary',
3929
},
40-
render: args => ({
41-
components: { Component },
42-
setup() {
43-
return { args }
44-
},
45-
template: '<Component v-bind="args">Small Button</Component>',
46-
}),
4730
}
4831

4932
export const Disabled: Story = {
5033
args: {
34+
default: 'Disabled Button',
5135
disabled: true,
5236
},
53-
render: args => ({
54-
components: { Component },
55-
setup() {
56-
return { args }
57-
},
58-
template: '<Component v-bind="args">Disabled Button</Component>',
59-
}),
6037
}
6138

6239
export const WithIcon: Story = {
6340
args: {
64-
variant: 'secondary',
41+
default: 'Search',
6542
classicon: 'i-carbon:search',
43+
variant: 'secondary',
6644
},
67-
render: args => ({
68-
components: { Component },
69-
setup() {
70-
return { args }
71-
},
72-
template: '<Component v-bind="args">Search</Component>',
73-
}),
7445
}
7546

7647
export const WithKeyboardShortcut: Story = {
7748
args: {
78-
variant: 'secondary',
7949
ariaKeyshortcuts: '/',
50+
default: 'Search',
51+
variant: 'secondary',
8052
},
81-
render: args => ({
82-
components: { Component },
83-
setup() {
84-
return { args }
85-
},
86-
template: '<Component v-bind="args">Search</Component>',
87-
}),
8853
}
8954

9055
export const Block: Story = {
9156
args: {
9257
block: true,
58+
default: 'Full Width Button',
9359
},
94-
render: args => ({
95-
components: { Component },
96-
setup() {
97-
return { args }
98-
},
99-
template: '<Component v-bind="args">Full Width Button</Component>',
100-
}),
10160
}

app/components/Button/Base.vue

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
<script setup lang="ts">
22
const props = withDefaults(
33
defineProps<{
4-
/** Whether the button is disabled */
54
disabled?: boolean
6-
/**
7-
* HTML button type attribute
8-
* @default "button"
9-
*/
5+
/** @default "button" */
106
type?: 'button' | 'submit'
11-
/**
12-
* Button visual style variant
13-
* @default "secondary"
14-
*/
7+
/** @default "secondary" */
158
variant?: 'primary' | 'secondary'
16-
/**
17-
* Button size
18-
* @default "medium"
19-
*/
9+
/** @default "medium" */
2010
size?: 'small' | 'medium'
2111
/** Keyboard shortcut hint */
2212
ariaKeyshortcuts?: string
23-
/** Whether the button should take full width */
13+
/** Forces the button to occupy the entire width of its container. */
2414
block?: boolean
25-
/** Icon class (e.g., i-carbon-add) */
15+
/** Icon class (e.g., i-carbon-add) applied to the left of the text. */
2616
classicon?: string
2717
}>(),
2818
{

app/components/Input/Base.stories.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@ import Component from './Base.vue'
44

55
const meta = {
66
component: Component,
7-
87
argTypes: {
98
disabled: { control: 'boolean' },
109
size: {
1110
control: 'select',
1211
options: ['small', 'medium', 'large'],
1312
},
14-
noCorrect: {
15-
control: 'boolean',
16-
description: 'Whether to disable browser autocorrect',
17-
},
1813
onFocus: {
1914
action: 'focus',
2015
description: 'Fired when the input gains focus',

app/components/Input/Base.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ const model = defineModel<string>({ default: '' })
66
const props = withDefaults(
77
defineProps<{
88
disabled?: boolean
9+
/** @default 'medium' */
910
size?: 'small' | 'medium' | 'large'
11+
/**
12+
* Prevents the browser from automatically modifying user input
13+
* (e.g. autocorrect, autocomplete, autocapitalize, and spellcheck).
14+
* @default true
15+
*/
1016
noCorrect?: boolean
1117
}>(),
1218
{

0 commit comments

Comments
 (0)