Skip to content

Commit

Permalink
feat: add storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
BayanBennett committed Feb 21, 2022
1 parent b16877d commit 3394fec
Show file tree
Hide file tree
Showing 11 changed files with 37,260 additions and 8,668 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
overrides: [
{
files: ["*.js"],
env: {
node: true,
},
},
{
files: ["stories/**/*"],
extends: ["plugin:storybook/recommended"],
},
],
};
10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
"stories": [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions"
],
"framework": "@storybook/react"
}
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
2 changes: 1 addition & 1 deletion src/Button.tsx → libs/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";

export const Button = styled.button`
background-color: green;
background-color: coral;
`;
File renamed without changes.
Loading

0 comments on commit 3394fec

Please sign in to comment.