mehdi-simple-tailwind-button 0.1.1 → 0.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/dist/index.js +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,6 +25,13 @@ __export(index_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var buttonStyles = {
|
|
29
|
+
base: "px-6 py-3 rounded-lg font-medium transition-all",
|
|
30
|
+
variants: {
|
|
31
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 shadow-lg",
|
|
32
|
+
secondary: "bg-gray-200 text-gray-800 hover:bg-gray-300"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
28
35
|
var SimpleButton = ({
|
|
29
36
|
children,
|
|
30
37
|
variant = "primary"
|
|
@@ -32,10 +39,7 @@ var SimpleButton = ({
|
|
|
32
39
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
40
|
"button",
|
|
34
41
|
{
|
|
35
|
-
className:
|
|
36
|
-
px-6 py-3 rounded-lg font-medium transition-all
|
|
37
|
-
${variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700 shadow-lg" : "bg-gray-200 text-gray-800 hover:bg-gray-300"}
|
|
38
|
-
`,
|
|
42
|
+
className: `${buttonStyles.base} ${buttonStyles.variants[variant]}`,
|
|
39
43
|
children
|
|
40
44
|
}
|
|
41
45
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var buttonStyles = {
|
|
6
|
+
base: "px-6 py-3 rounded-lg font-medium transition-all",
|
|
7
|
+
variants: {
|
|
8
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 shadow-lg",
|
|
9
|
+
secondary: "bg-gray-200 text-gray-800 hover:bg-gray-300"
|
|
10
|
+
}
|
|
11
|
+
};
|
|
5
12
|
var SimpleButton = ({
|
|
6
13
|
children,
|
|
7
14
|
variant = "primary"
|
|
@@ -9,10 +16,7 @@ var SimpleButton = ({
|
|
|
9
16
|
return /* @__PURE__ */ jsx(
|
|
10
17
|
"button",
|
|
11
18
|
{
|
|
12
|
-
className:
|
|
13
|
-
px-6 py-3 rounded-lg font-medium transition-all
|
|
14
|
-
${variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700 shadow-lg" : "bg-gray-200 text-gray-800 hover:bg-gray-300"}
|
|
15
|
-
`,
|
|
19
|
+
className: `${buttonStyles.base} ${buttonStyles.variants[variant]}`,
|
|
16
20
|
children
|
|
17
21
|
}
|
|
18
22
|
);
|