Skip to content

Commit 222dd22

Browse files
committed
Storybook Init
1 parent 83ce6cb commit 222dd22

161 files changed

Lines changed: 20784 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Build output
5+
dist
6+
dist-ssr
7+
storybook-static
8+
9+
# Environment
10+
*.local
11+
.env
12+
.env.*
13+
14+
# Logs
15+
logs
16+
*.log
17+
npm-debug.log*
18+
yarn-debug.log*
19+
yarn-error.log*
20+
pnpm-debug.log*
21+
lerna-debug.log*
22+
23+
# Editor directories and files
24+
.vscode/*
25+
!.vscode/extensions.json
26+
.idea
27+
.DS_Store
28+
*.suo
29+
*.ntvs*
30+
*.njsproj
31+
*.sln
32+
*.sw?
33+
34+
# OS files
35+
Thumbs.db
36+
37+
# Test coverage
38+
coverage
39+
40+
*storybook.log

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@pigna:registry=https://npm.pkg.github.com
2+

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/**
2+
storybook-static/**
3+
node_modules/**
4+

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"arrowParens": "always",
8+
"bracketSpacing": true,
9+
"endOfLine": "lf"
10+
}
11+

.storybook/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { StorybookConfig } from '@storybook/react-vite';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.stories.@(ts|tsx)'],
5+
addons: ['@storybook/addon-docs', '@storybook/addon-a11y'],
6+
framework: '@storybook/react-vite',
7+
};
8+
9+
export default config;

.storybook/preview.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { Preview } from '@storybook/react-vite';
2+
import '../src/styles/global.scss';
3+
4+
const preview: Preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /date$/i,
10+
},
11+
},
12+
a11y: {
13+
test: 'error',
14+
},
15+
backgrounds: {
16+
disable: true,
17+
},
18+
},
19+
globalTypes: {
20+
theme: {
21+
description: 'Global theme for components',
22+
toolbar: {
23+
title: 'Theme',
24+
icon: 'paintbrush',
25+
items: [
26+
{ value: 'light', title: 'Light', icon: 'sun' },
27+
{ value: 'dark', title: 'Dark', icon: 'moon' },
28+
],
29+
dynamicTitle: true,
30+
},
31+
},
32+
},
33+
initialGlobals: {
34+
theme: 'light',
35+
},
36+
decorators: [
37+
(Story, context) => {
38+
const theme = context.globals.theme || 'light';
39+
document.documentElement.setAttribute('data-theme', theme);
40+
return <Story />;
41+
},
42+
],
43+
};
44+
45+
export default preview;
46+

.stylelintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "stylelint-config-standard-scss",
3+
"rules": {
4+
"selector-class-pattern": null,
5+
"scss/dollar-variable-pattern": null,
6+
"custom-property-pattern": null,
7+
"custom-property-empty-line-before": null,
8+
"declaration-empty-line-before": null,
9+
"property-no-vendor-prefix": null,
10+
"color-hex-length": null,
11+
"value-keyword-case": ["lower", {
12+
"camelCaseSvgKeywords": true,
13+
"ignoreKeywords": ["Roboto", "Arial", "Consolas", "Helvetica"]
14+
}]
15+
}
16+
}

0 commit comments

Comments
 (0)