Setup styled-components, typescript, barebones button component, global styles, and shared css variables
This commit is contained in:
11
.storybook/main.js
Normal file
11
.storybook/main.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
"stories": [
|
||||
"../src/**/*.stories.mdx",
|
||||
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
||||
],
|
||||
"addons": [
|
||||
"@storybook/addon-links",
|
||||
"@storybook/addon-essentials",
|
||||
"@storybook/preset-create-react-app"
|
||||
]
|
||||
}
|
8
.storybook/preview-head.html
Normal file
8
.storybook/preview-head.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,700,800,900"
|
||||
/>
|
22
.storybook/preview.js
Normal file
22
.storybook/preview.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
|
||||
import { GlobalStyle } from "../src/shared/global";
|
||||
// Global decorator to apply the styles to all stories
|
||||
export const decorators = [
|
||||
(Story) => (
|
||||
<>
|
||||
<GlobalStyle />
|
||||
<Story />
|
||||
</>
|
||||
),
|
||||
];
|
||||
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/,
|
||||
},
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user