Skip to content

Commit 6c1c338

Browse files
refactor: reorganize project structure (#26)
1 parent e5681c4 commit 6c1c338

33 files changed

+36
-828
lines changed

package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
"default": "./dist/index.cjs"
2626
}
2727
},
28+
"./tailwind": {
29+
"import": {
30+
"types": "./dist/tailwind/index.d.ts",
31+
"default": "./dist/tailwind/index.js"
32+
},
33+
"require": {
34+
"types": "./dist/tailwind/index.d.cts",
35+
"default": "./dist/tailwind/index.cjs"
36+
}
37+
},
2838
"./utilities": {
2939
"import": {
3040
"types": "./dist/utilities/index.d.ts",
@@ -34,6 +44,16 @@
3444
"types": "./dist/utilities/index.d.cts",
3545
"default": "./dist/utilities/index.cjs"
3646
}
47+
},
48+
"./components": {
49+
"import": {
50+
"types": "./dist/components/index.d.ts",
51+
"default": "./dist/components/index.js"
52+
},
53+
"require": {
54+
"types": "./dist/components/index.d.cts",
55+
"default": "./dist/components/index.cjs"
56+
}
3757
}
3858
},
3959
"main": "./dist/index.cjs",

src/components/button/Button.stories.tsx renamed to src/components/Button/Button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Meta } from "@storybook/react";
2-
import { Button } from "./Button";
2+
import { Button } from "./index";
33
import { StoryObj } from "@storybook/react";
44

55
const meta = {

src/components/button/Button.tsx renamed to src/components/Button/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { ButtonHTMLAttributes, ReactElement, forwardRef } from "react";
21
import { Slot } from "@radix-ui/react-slot";
3-
import { type VariantProps, cva } from "class-variance-authority";
2+
import { cva, type VariantProps } from "class-variance-authority";
3+
import React, { ButtonHTMLAttributes, forwardRef } from "react";
44
import { cn } from "../../utilities/index";
55

66
const buttonVariants = cva(

src/components/Button/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Button";

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Button";

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { cn } from "./utilities/index";
2-
export { zenmlPlugin, zenmlPreset } from "./tailwind/index";
3-
export { Button, ButtonProps } from "./components/button/Button";
1+
export * from "./utilities/index";
2+
export * from "./tailwind/index";
3+
export * from "./components/index";

src/stories/Button.story.ts

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

src/stories/Button.tsx

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

0 commit comments

Comments
 (0)