@bouko/react 2.8.1 → 2.8.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.
|
@@ -52,4 +52,15 @@ export declare const slideY: (y?: number) => {
|
|
|
52
52
|
y: number;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
export declare const scale: (x?: number) => {
|
|
56
|
+
initial: {
|
|
57
|
+
scale: number;
|
|
58
|
+
};
|
|
59
|
+
animate: {
|
|
60
|
+
scale: number;
|
|
61
|
+
};
|
|
62
|
+
exit: {
|
|
63
|
+
scale: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
55
66
|
export { AnimatePresence } from "framer-motion";
|
|
@@ -5,6 +5,7 @@ export { default as AbsoluteBox } from "./layout/absolute";
|
|
|
5
5
|
export { default as Heading } from "./heading/normal";
|
|
6
6
|
export { default as PageHeading } from "./heading/page";
|
|
7
7
|
export * from "./layout/flex";
|
|
8
|
+
export * from "./tab";
|
|
8
9
|
export { default as Pagination } from "./pagination";
|
|
9
10
|
export { default as Button } from "./button/normal";
|
|
10
11
|
export { default as IconButton } from "./button/icon";
|
package/dist/components/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as AbsoluteBox } from "./layout/absolute";
|
|
|
5
5
|
export { default as Heading } from "./heading/normal";
|
|
6
6
|
export { default as PageHeading } from "./heading/page";
|
|
7
7
|
export * from "./layout/flex";
|
|
8
|
+
export * from "./tab";
|
|
8
9
|
export { default as Pagination } from "./pagination";
|
|
9
10
|
export { default as Button } from "./button/normal";
|
|
10
11
|
export { default as IconButton } from "./button/icon";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn, css } from "@bouko/style";
|
|
3
|
+
export const TabItem = ({ name, icon, isActive }) => (_jsxs("div", { className: cn(styles, isActive && "bg-background-light text-primary hover:cursor-default"), children: [_jsx("div", { className: cn("duration-200", isActive && "text-accent"), children: icon }), name] }));
|
|
4
|
+
const styles = css({
|
|
5
|
+
base: "flex items-center gap-2 px-2 py-1 rounded-xs duration-200 cursor-pointer",
|
|
6
|
+
color: "bg-background-light/70 hover:bg-background-light/90 border border-border-dark",
|
|
7
|
+
text: "font-semibold text-sm text-primary-darker"
|
|
8
|
+
});
|