Skip to content

Commit 61c6d2d

Browse files
committed
tailwind + figmatoken + storybook
1 parent 8ba80c0 commit 61c6d2d

42 files changed

Lines changed: 10955 additions & 3698 deletions

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
43+
*storybook.log

.storybook/main.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { StorybookConfig } from "@storybook/experimental-nextjs-vite";
2+
3+
const config: StorybookConfig = {
4+
"stories": [
5+
"../src/**/*.mdx",
6+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7+
],
8+
"addons": [
9+
"@storybook/addon-essentials",
10+
"@storybook/addon-onboarding",
11+
"@chromatic-com/storybook",
12+
"@storybook/experimental-addon-test",
13+
"@storybook/addon-styling-webpack"
14+
],
15+
"framework": {
16+
"name": "@storybook/experimental-nextjs-vite",
17+
"options": {}
18+
},
19+
"staticDirs": [
20+
"../public"
21+
]
22+
};
23+
export default config;

.storybook/preview.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from '@storybook/react';
2+
import '../src/app/globals.css';
3+
4+
const preview: Preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/i,
10+
},
11+
},
12+
},
13+
};
14+
15+
export default preview;

.storybook/vitest.setup.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { beforeAll } from 'vitest';
2+
import { setProjectAnnotations } from '@storybook/experimental-nextjs-vite';
3+
import * as projectAnnotations from './preview';
4+
5+
// This is an important step to apply the right configuration when testing your stories.
6+
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
7+
const project = setProjectAnnotations([projectAnnotations]);
8+
9+
beforeAll(project.beforeAll);

design-tokens/tokens.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"colors": {
3+
"primary": {
4+
"500": {
5+
"value": "#3B82F6",
6+
"type": "color"
7+
},
8+
"600": {
9+
"value": "#2563EB",
10+
"type": "color"
11+
}
12+
}
13+
},
14+
"spacing": {
15+
"sm": {
16+
"value": "8px",
17+
"type": "dimension"
18+
},
19+
"md": {
20+
"value": "16px",
21+
"type": "dimension"
22+
},
23+
"lg": {
24+
"value": "24px",
25+
"type": "dimension"
26+
}
27+
}
28+
}

docs/design/design-system.fig

Whitespace-only changes.

docs/design/figma-URL.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Figma 设计文件链接
2+
3+
- 主设计系统: [DesignSystem.fig](https://www.figma.com/design/ZuZWPWcPLSqaX8d1p9uTpX/DesignSystem)
4+
- 按钮组件节点 ID: 3-1377
5+
6+
### 核心组件
7+
8+
| 组件名称 | 节点 ID | 最后更新 |
9+
| -------- | ------- | ---------- |
10+
| 主按钮 | 3-1377 | 2025-03-13 |

0 commit comments

Comments
 (0)