Skip to content

Commit 157c478

Browse files
committed
feat: add react component lib
1 parent 6c80c64 commit 157c478

16 files changed

Lines changed: 16783 additions & 35 deletions

File tree

.eslintrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
"prompts": "^2.4.2",
3232
"unbuild": "^0.9.4"
3333
}
34-
}
34+
}

src/index.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ async function init() {
127127
},
128128
{
129129
// 如果还有下一层
130-
type: framework => framework && framework.variants ? 'select' : null,
131-
name: 'variant',
132-
message: reset('Select a variant:'),
133-
choices: framework =>
134-
framework.variants.map((variant) => {
135-
const variantColor = variant.color
136-
return {
137-
title: variantColor(variant.display || variant.name),
138-
value: variant.name,
139-
}
140-
}),
141-
},
130+
// type: framework => framework && framework.variants ? 'select' : null,
131+
// name: 'variant',
132+
// message: reset('Select a variant:'),
133+
// choices: framework =>
134+
// framework.variants.map((variant) => {
135+
// const variantColor = variant.color
136+
// return {
137+
// title: variantColor(variant.display || variant.name),
138+
// value: variant.name,
139+
// }
140+
// }),
141+
// },
142142
],
143143
{
144144
onCancel: () => {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
"stories": [
3+
"../src/**/*.stories.mdx",
4+
"../src/**/*.stories.@(js|jsx|ts|tsx)"
5+
],
6+
"addons": [
7+
"@storybook/addon-links",
8+
"@storybook/addon-essentials",
9+
"@storybook/addon-interactions"
10+
],
11+
"framework": "@storybook/react",
12+
"core": {
13+
"builder": "@storybook/builder-vite"
14+
},
15+
"features": {
16+
"storyStoreV7": true
17+
}
18+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<script>
2+
window.global = window;
3+
</script>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: "^on[A-Z].*" },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
}

0 commit comments

Comments
 (0)