-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
6 changed files
with
17,027 additions
and
4,035 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { StorybookConfig } from "@storybook/nextjs"; | ||
|
||
const config: StorybookConfig = { | ||
// Stories and Components location | ||
stories: [ | ||
"../components/**/*.mdx", | ||
"../components/**/*.stories.@(js|jsx|mjs|ts|tsx)" | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/nextjs", | ||
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,17 @@ | ||
import type { Preview } from "@storybook/react"; | ||
// Add any used css here | ||
import "../styles/globals.css" | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import {AButton} from './Buttons'; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export | ||
export default { | ||
// Name of the component for the stories | ||
component: AButton, | ||
|
||
// Stories Title | ||
title: 'AButton', | ||
|
||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs | ||
tags: ['autodocs'], | ||
|
||
// Add documentation for each args. More on argTypes: https://storybook.js.org/docs/react/api/argtypes | ||
argTypes: { | ||
text:{ | ||
description:"Button Text" | ||
}, | ||
type:{ | ||
control:"select", | ||
options:["button","submit","reset"], | ||
description:"Button Type" | ||
}, | ||
disabled:{ | ||
control:"boolean", | ||
description:"Button disabled or not" | ||
}, | ||
} | ||
}; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const Default = { | ||
// Args for the component | ||
args:{ | ||
text: "Default", | ||
type: "button" | ||
} | ||
}; | ||
export const Submit = { | ||
args:{ | ||
text: "Submit", | ||
type: "submit" | ||
} | ||
}; | ||
export const Reset = { | ||
args:{ | ||
text: "Reset", | ||
type: "reset" | ||
} | ||
}; | ||
|
Oops, something went wrong.