@mcnivendev/design-system 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -5
- package/react/Btn.js +7 -0
- package/react/Card.js +5 -0
- package/react/index.js +2 -0
- package/react/Btn.tsx +0 -12
- package/react/Card.tsx +0 -8
- package/react/index.ts +0 -2
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcnivendev/design-system",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tailwind 4 design system with React components and precompiled CSS",
|
|
6
6
|
"main": "tailwind/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
+
"./react": "./react/index.js",
|
|
8
9
|
"./tailwind": "./tailwind/index.js",
|
|
9
|
-
"./react": "./react/index.ts",
|
|
10
10
|
"./css": "./dist/tailwind.css"
|
|
11
11
|
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build:css": "npx tailwindcss -i ./src/tailwind.css -o ./dist/tailwind.css --minify"
|
|
14
|
-
},
|
|
15
12
|
"peerDependencies": {
|
|
16
13
|
"react": ">=18 <20",
|
|
17
14
|
"react-dom": ">=18 <20",
|
package/react/Btn.js
ADDED
package/react/Card.js
ADDED
package/react/index.js
ADDED
package/react/Btn.tsx
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
interface BtnProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
variant?: 'primary' | 'default'
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const Btn: React.FC<BtnProps> = ({ variant = 'default', ...props }) => {
|
|
8
|
-
// Only allow preset classes, no className override
|
|
9
|
-
const baseClass = 'btn'
|
|
10
|
-
const variantClass = variant === 'primary' ? 'btn-primary' : ''
|
|
11
|
-
return <button className={`${baseClass} ${variantClass}`} {...props} />
|
|
12
|
-
}
|
package/react/Card.tsx
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
4
|
-
|
|
5
|
-
export const Card: React.FC<CardProps> = ({ children, ...props }) => {
|
|
6
|
-
// Only the design system class
|
|
7
|
-
return <div className="card" {...props}>{children}</div>
|
|
8
|
-
}
|
package/react/index.ts
DELETED