@bouko/react 2.6.3 → 2.6.5

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,10 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn, opacitize } from "@bouko/style";
3
3
  export default function IconButton({ style, color = "--color-accent", icon, action, disabled = false }) {
4
- return (_jsx("button", { className: cn("hover:brightness-115 disabled:!cursor-not-allowed", style), style: styles(color), onClick: action, disabled: !action || disabled, children: icon }, void 0));
4
+ return (_jsx("button", { className: cn("flex hover:brightness-115 disabled:!cursor-not-allowed", style), style: styles(color), onClick: action, disabled: !action || disabled, children: icon }, void 0));
5
5
  }
6
6
  const styles = (color) => ({
7
- display: "flex",
8
7
  justifyContent: "center",
9
8
  itemsCenter: "center",
10
9
  padding: "0.5rem",
@@ -1,8 +1,9 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode, RefObject } from "react";
2
2
  declare type Props = {
3
- position?: string;
3
+ pos?: string;
4
4
  style?: string;
5
+ ref?: RefObject<HTMLDivElement | null>;
5
6
  children: ReactNode;
6
7
  };
7
- export default function AbsoluteBox({ position, style, children }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export default function AbsoluteBox({ pos, style, ref, children }: Props): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@bouko/style";
3
- export default function AbsoluteBox({ position, style, children }) {
4
- return (_jsx("div", { className: cn(styles.container, position), children: _jsx("div", { className: cn(styles.subcontainer, style), children: children }, void 0) }, void 0));
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
5
  }
6
6
  const styles = {
7
7
  container: "absolute",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "2.6.3",
4
+ "version": "2.6.5",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",