forked from halo-dev/halo
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
61 changed files
with
7,016 additions
and
2,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
extends: ["../../.eslintrc.cjs"], | ||
extends: ["../../.eslintrc.cjs", "plugin:storybook/recommended"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { StorybookConfig } from "@storybook/vue3-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-styling", | ||
], | ||
framework: { | ||
name: "@storybook/vue3-vite", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Preview } from "@storybook/vue3"; | ||
|
||
import "../src/styles/tailwind.css"; | ||
import "overlayscrollbars/overlayscrollbars.css"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
layout: "padded", | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
console/packages/components/src/components/alert/Alert.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import type { Meta, StoryObj } from "@storybook/vue3"; | ||
|
||
import { VAlert } from "."; | ||
|
||
const meta: Meta<typeof VAlert> = { | ||
title: "Alert", | ||
component: VAlert, | ||
tags: ["autodocs"], | ||
render: (args) => ({ | ||
components: { VAlert }, | ||
setup() { | ||
return { args }; | ||
}, | ||
template: `<VAlert v-bind="args"></VAlert>`, | ||
}), | ||
argTypes: { | ||
type: { | ||
control: { type: "select" }, | ||
options: ["default", "success", "info", "warning", "error"], | ||
}, | ||
closable: { | ||
control: { type: "boolean" }, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof VAlert>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
type: "default", | ||
title: "default", | ||
description: "Halo", | ||
}, | ||
}; | ||
|
||
export const Success: Story = { | ||
args: { | ||
type: "success", | ||
title: "success", | ||
description: "Halo", | ||
}, | ||
}; | ||
|
||
export const Info: Story = { | ||
args: { | ||
type: "info", | ||
title: "info", | ||
description: "Halo", | ||
}, | ||
}; | ||
|
||
export const Warning: Story = { | ||
args: { | ||
type: "warning", | ||
title: "warning", | ||
description: "Halo", | ||
}, | ||
}; | ||
|
||
export const Error: Story = { | ||
args: { | ||
type: "error", | ||
title: "error", | ||
description: "Halo", | ||
}, | ||
}; |
91 changes: 0 additions & 91 deletions
91
console/packages/components/src/components/alert/Alert.story.vue
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
console/packages/components/src/components/avatar/Avatar.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import type { Meta, StoryObj } from "@storybook/vue3"; | ||
|
||
import { VAvatar } from "."; | ||
|
||
const meta: Meta<typeof VAvatar> = { | ||
title: "Avatar", | ||
component: VAvatar, | ||
tags: ["autodocs"], | ||
render: (args) => ({ | ||
components: { VAvatar }, | ||
setup() { | ||
return { args }; | ||
}, | ||
template: `<VAvatar v-bind="args" />`, | ||
}), | ||
argTypes: { | ||
size: { | ||
control: { type: "select" }, | ||
options: ["lg", "md", "sm", "xs"], | ||
defaultValue: "md", | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof VAvatar>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
src: "https://halo.run/logo", | ||
alt: "Hello", | ||
}, | ||
}; | ||
|
||
export const Circle: Story = { | ||
args: { | ||
src: "https://halo.run/logo", | ||
alt: "Hello", | ||
circle: true, | ||
}, | ||
}; | ||
|
||
export const Text: Story = { | ||
args: { | ||
alt: "Ryan Wang", | ||
}, | ||
}; |
Oops, something went wrong.