export const Primary: Story = {
- args: {
- label: 'Primary Button',
- severity: 'primary',
- },
+ args: { variant: 'primary' },
+ render: (args) => ({
+ components: { NychButton },
+ setup: () => ({ args }),
+ template: `Summon the Oracle`,
+ }),
}
-export const Secondary: Story = {
- args: {
- label: 'Secondary Button',
- severity: 'secondary',
- },
-}
-
-export const Info: Story = {
- args: {
- label: 'Info Button',
- severity: 'info',
- },
-}
-
-export const Success: Story = {
- args: {
- label: 'Success Button',
- severity: 'success',
- },
-}
-
-export const Warning: Story = {
- args: {
- label: 'Warning Button',
- severity: 'warning',
- },
-}
-
-export const Danger: Story = {
- args: {
- label: 'Danger Button',
- severity: 'danger',
- },
-}
-
-export const Disabled: Story = {
- args: {
- label: 'Disabled Button',
- disabled: true,
- },
-}
-
-export const Loading: Story = {
- args: {
- label: 'Loading Button',
- loading: true,
- },
+export const AllVariants: Story = {
+ render: () => ({
+ components: { NychButton },
+ template: `
+
+ Primary
+ Secondary
+ Info
+ Success
+ Warning
+ Danger
+
+ `,
+ }),
}
export const Sizes: Story = {
render: () => ({
components: { NychButton },
- setup() {
- return {}
- },
template: `
-
-
-
+ Small
+ Default
+ Large
`,
}),
}
+export const Disabled: Story = {
+ args: { disabled: true },
+ render: (args) => ({
+ components: { NychButton },
+ setup: () => ({ args }),
+ template: `Disabled`,
+ }),
+}
+
+export const Loading: Story = {
+ args: { loading: true },
+ render: (args) => ({
+ components: { NychButton },
+ setup: () => ({ args }),
+ template: `Ask`,
+ }),
+}
+
export const Interactive: Story = {
render: () => ({
components: { NychButton },
@@ -130,12 +110,7 @@ export const Interactive: Story = {
},
template: `
-
+
Click Me
Clicks: {{ clickCount }}
`,