sate-lib 1.1.15 → 1.1.17
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.
|
@@ -3,4 +3,5 @@ import "./badge.css";
|
|
|
3
3
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
declare const Badge: ({ className, children, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Badge;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./badge.css";
|
|
3
|
-
|
|
4
|
-
return /*#__PURE__*/ jsx("span", {
|
|
3
|
+
const Badge = ({ className = "", children, ...props })=>/*#__PURE__*/ jsx("span", {
|
|
5
4
|
className: `badge ${className}`.trim(),
|
|
6
5
|
...props,
|
|
7
6
|
children: children
|
|
8
7
|
});
|
|
9
|
-
|
|
10
|
-
export {
|
|
8
|
+
const badge = Badge;
|
|
9
|
+
export { badge as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./button.css";
|
|
2
2
|
interface ButtonProps {
|
|
3
3
|
primary?: boolean;
|
|
4
4
|
backgroundColor?: string;
|
|
5
|
-
size?:
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
6
|
label: string;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
export
|
|
9
|
+
declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Button;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./button.css";
|
|
3
|
-
const Button = ({ primary = false, size =
|
|
4
|
-
const mode = primary ?
|
|
3
|
+
const Button = ({ primary = false, size = "medium", backgroundColor, label, ...props })=>{
|
|
4
|
+
const mode = primary ? "demo-button--primary" : "demo-button--secondary";
|
|
5
5
|
return /*#__PURE__*/ jsx("button", {
|
|
6
6
|
type: "button",
|
|
7
7
|
className: [
|
|
8
|
-
|
|
8
|
+
"demo-button",
|
|
9
9
|
`demo-button--${size}`,
|
|
10
10
|
mode
|
|
11
|
-
].join(
|
|
11
|
+
].join(" "),
|
|
12
12
|
style: {
|
|
13
13
|
backgroundColor
|
|
14
14
|
},
|
|
@@ -16,4 +16,5 @@ const Button = ({ primary = false, size = 'medium', backgroundColor, label, ...p
|
|
|
16
16
|
children: label
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
const button_button = Button;
|
|
20
|
+
export { button_button as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button } from "./components/button/button";
|
|
2
|
-
export { Badge } from "./components/badge/badge";
|
|
1
|
+
export { default as Button } from "./components/button/button";
|
|
2
|
+
export { default as Badge } from "./components/badge/badge";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export { Badge, Button };
|
|
1
|
+
import button_button from "./components/button/button.js";
|
|
2
|
+
import badge from "./components/badge/badge.js";
|
|
3
|
+
export { badge as Badge, button_button as Button };
|