elegant-lib 0.0.2 → 0.0.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.d.ts +7 -2
- package/dist/index.js +2 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "class-variance-authority";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
5
|
import { ButtonProps } from "@base-ui/react";
|
|
5
6
|
|
|
6
7
|
//#region src/components/ui/button.d.ts
|
|
7
|
-
type Props = ButtonProps;
|
|
8
|
+
type Props = ButtonProps & VariantProps<typeof buttonVariants> & {};
|
|
9
|
+
declare const buttonVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "contained" | "primary" | "error" | "info" | "warning" | "outline" | "secondary" | "text" | null | undefined;
|
|
11
|
+
size?: "default" | "medium" | "small" | "large" | "icon" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
8
13
|
declare function Button(props: Props): react_jsx_runtime0.JSX.Element;
|
|
9
14
|
//#endregion
|
|
10
15
|
export { Button };
|
package/dist/index.js
CHANGED
|
@@ -25,9 +25,7 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
25
25
|
medium: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
26
|
small: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
27
27
|
large: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
-
icon: "size-9"
|
|
29
|
-
"icon-sm": "size-8",
|
|
30
|
-
"icon-lg": "size-10"
|
|
28
|
+
icon: "size-9"
|
|
31
29
|
}
|
|
32
30
|
},
|
|
33
31
|
defaultVariants: {
|
|
@@ -36,11 +34,7 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
36
|
function Button(props) {
|
|
39
|
-
return /* @__PURE__ */ jsx(MuiButton, {
|
|
40
|
-
...props,
|
|
41
|
-
variant: "",
|
|
42
|
-
children: "Hello world"
|
|
43
|
-
});
|
|
37
|
+
return /* @__PURE__ */ jsx(MuiButton, { ...props });
|
|
44
38
|
}
|
|
45
39
|
|
|
46
40
|
//#endregion
|