-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(viz): setup tailwind for storybook
- Loading branch information
1 parent
ca985e6
commit 16ed7fa
Showing
10 changed files
with
218 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions" | ||
], | ||
"framework": "@storybook/react", | ||
"core": { | ||
"builder": "@storybook/builder-webpack5" | ||
} | ||
} | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], | ||
framework: '@storybook/react', | ||
core: { | ||
builder: '@storybook/builder-webpack5', | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import '../dist/styles.css'; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} | ||
}; |
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 |
---|---|---|
|
@@ -10,31 +10,39 @@ | |
"data structure", | ||
"collections-typescript" | ||
], | ||
"resolutions": { | ||
"webpack": "^5" | ||
}, | ||
"author": "tur1ng <[email protected]>", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/always-maap/TS-Collection/issues" | ||
}, | ||
"scripts": { | ||
"storybook": "yarn build-tailwind && start-storybook -p 6006", | ||
"build-storybook": "build-storybook", | ||
"build-tailwind": "tailwindcss -i ./src/styles.css -o ./dist/styles.css" | ||
}, | ||
"homepage": "https://github.com/always-maap/TS-Collection#readme", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.9", | ||
"@storybook/addon-actions": "^6.5.9", | ||
"@storybook/addon-essentials": "^6.5.9", | ||
"@storybook/addon-interactions": "^6.5.9", | ||
"@storybook/addon-links": "^6.5.9", | ||
"@storybook/addon-postcss": "^3.0.0-alpha.1", | ||
"@storybook/builder-webpack5": "^6.5.9", | ||
"@storybook/manager-webpack5": "^6.5.9", | ||
"@storybook/react": "^6.5.9", | ||
"@storybook/testing-library": "^0.0.13", | ||
"autoprefixer": "^10.4.7", | ||
"babel-loader": "^8.2.5", | ||
"config": "*" | ||
"config": "*", | ||
"postcss": "^8.4.14", | ||
"tailwindcss": "^3.1.6" | ||
}, | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
} | ||
} |
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,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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 @@ | ||
export * from './renderers/Array1D'; |
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 |
---|---|---|
@@ -1,3 +1,17 @@ | ||
export default function Array1D() { | ||
return <div>Array 1D</div>; | ||
import { Array1DAction } from '@ts-collection/protocol'; | ||
|
||
type Props = { | ||
initial: number[]; | ||
actions: Array1DAction[]; | ||
}; | ||
|
||
export default function Array1D(props: Props) { | ||
const { initial, actions } = props; | ||
return ( | ||
<div className="flex"> | ||
{initial.map((value, index) => { | ||
return <div key={index}>{value}</div>; | ||
})} | ||
</div> | ||
); | ||
} |
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,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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,8 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [`src/**/*.{js,ts,jsx,tsx}`], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
Oops, something went wrong.