Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Chromatic"
on: push

jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run chromatic --exit-once-uploaded --auto-accept-changes main
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ node_modules
yarn.lock
docs

/dist
/dist
*storybook.log
storybook-static
14 changes: 14 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { StorybookConfig } from '@storybook/html-vite';

const config: StorybookConfig = {
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
"addons": [],
"framework": {
"name": "@storybook/html-vite",
"options": {}
}
};
export default config;
14 changes: 14 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Preview } from '@storybook/html-vite';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}
7 changes: 4 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import storybook from "eslint-plugin-storybook";

import globals from "globals";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
Expand Down Expand Up @@ -80,7 +82,7 @@ const mdcs = {

export default [
{
files: [ "src/**/*.ts" ],
files: [ "**/*.ts", "**/*.mjs" ],
// ignores: [],
languageOptions: {
parser: tsParser,
Expand Down Expand Up @@ -118,5 +120,4 @@ export default [
],
"key-spacing": [ 0 ],
},
},
];
}, ...storybook.configs[ "flat/recommended" ] ];
Loading
Loading