-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fa1bb7
commit cb8d49d
Showing
10 changed files
with
3,307 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { StorybookConfig } from "storybook-framework-qwik"; | ||
import type { InlineConfig } from "vite"; | ||
|
||
const config: StorybookConfig = { | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-themes", | ||
"@storybook/addon-a11y", | ||
], | ||
framework: { | ||
name: "storybook-framework-qwik", | ||
}, | ||
core: { | ||
renderer: "storybook-framework-qwik", | ||
}, | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
viteFinal: async (config: InlineConfig) => { | ||
return config; | ||
}, | ||
}; | ||
|
||
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,3 @@ | ||
<script> | ||
window.global = window; | ||
</script> |
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,16 @@ | ||
import type { Parameters } from "storybook-framework-qwik"; | ||
|
||
import "../src/styles.css"; | ||
|
||
export const parameters: Parameters = { | ||
a11y: { | ||
config: {}, | ||
options: { | ||
checks: { "color-contrast": { options: { noScroll: true } } }, | ||
restoreScroll: true, | ||
}, | ||
}, | ||
options: { | ||
showRoots: true, | ||
}, | ||
}; |
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,46 @@ | ||
import type { Meta, StoryObj } from "storybook-framework-qwik"; | ||
import { | ||
Button, | ||
ButtonSizes, | ||
type ButtonProps, | ||
ButtonVariants, | ||
} from "./button"; | ||
|
||
const meta = { | ||
component: Button, | ||
title: "Button", | ||
argTypes: { | ||
disabled: { | ||
description: "Button disabled", | ||
control: { type: "boolean" }, | ||
}, | ||
size: { | ||
description: "Button size", | ||
options: ButtonSizes, | ||
control: { type: "inline-radio" }, | ||
}, | ||
variant: { | ||
description: "Button variant", | ||
options: ButtonVariants, | ||
control: { type: "inline-radio" }, | ||
}, | ||
rounded: { | ||
description: "Button rounded", | ||
control: { type: "boolean" }, | ||
} | ||
}, | ||
} satisfies Meta<ButtonProps>; | ||
|
||
type Story = StoryObj<ButtonProps>; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
disabled: false, | ||
size: "base", | ||
variant: "primary", | ||
rounded: false, | ||
}, | ||
render: (props) => <Button {...props}>Getting Started</Button>, | ||
} satisfies Story; |
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 |
---|---|---|
|
@@ -30,6 +30,9 @@ | |
}, | ||
{ | ||
"path": "./tsconfig.spec.json" | ||
}, | ||
{ | ||
"path": "./tsconfig.storybook.json" | ||
} | ||
] | ||
} |
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 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true | ||
}, | ||
"exclude": ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.tsx", "**/*.test.tsx"], | ||
"include": [ | ||
"src/**/*.stories.ts", | ||
"src/**/*.stories.js", | ||
"src/**/*.stories.jsx", | ||
"src/**/*.stories.tsx", | ||
"src/**/*.stories.mdx", | ||
".storybook/*.js", | ||
".storybook/*.ts", | ||
".storybook/preview.tsx", | ||
"src/**/*.d.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
Oops, something went wrong.