@bouko/react 2.6.2 → 2.6.4
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Separator } from "./layout/separator";
|
|
2
2
|
export { default as FadeBox } from "./layout/fade";
|
|
3
|
+
export { default as AbsoluteBox } from "./layout/absolute";
|
|
3
4
|
export { default as Heading } from "./heading/normal";
|
|
4
5
|
export { default as PageHeading } from "./heading/page";
|
|
5
6
|
export * from "./layout/flex";
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Separator } from "./layout/separator";
|
|
2
2
|
export { default as FadeBox } from "./layout/fade";
|
|
3
|
+
export { default as AbsoluteBox } from "./layout/absolute";
|
|
3
4
|
export { default as Heading } from "./heading/normal";
|
|
4
5
|
export { default as PageHeading } from "./heading/page";
|
|
5
6
|
export * from "./layout/flex";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
pos?: string;
|
|
4
|
+
style?: string;
|
|
5
|
+
ref?: RefObject<HTMLDivElement | null>;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export default function AbsoluteBox({ pos, style, ref, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@bouko/style";
|
|
3
|
+
export default function AbsoluteBox({ pos, style, ref, children }) {
|
|
4
|
+
return (_jsx("div", { className: cn(styles.container, pos), ref: ref, children: _jsx("div", { className: cn(styles.subcontainer, style), children: children }, void 0) }, void 0));
|
|
5
|
+
}
|
|
6
|
+
const styles = {
|
|
7
|
+
container: "absolute",
|
|
8
|
+
subcontainer: "relative w-full h-full"
|
|
9
|
+
};
|