@cronocode/react-box 0.2.1 → 0.2.2

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,6 +3,7 @@ declare type BoxProps = React.ComponentProps<typeof Box>;
3
3
  interface Props extends BoxProps {
4
4
  onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
5
5
  type?: React.ComponentProps<'button'>['type'];
6
+ disabled?: boolean;
6
7
  }
7
8
  export default function Button(props: Props): JSX.Element;
8
9
  export {};
@@ -21,15 +21,17 @@ function Button(props) {
21
21
  const {
22
22
  props: tagProps,
23
23
  onClick,
24
- type
24
+ type,
25
+ disabled
25
26
  } = props;
26
27
  const newTagProps = __spreadValues(__spreadValues({}, {
28
+ onClick,
27
29
  type: type || "button",
28
- onClick
30
+ disabled
29
31
  }), tagProps);
30
- const newProps = __spreadValues(__spreadValues({}, {
32
+ const newProps = __spreadValues(__spreadValues({}, props), {
31
33
  props: newTagProps
32
- }), props);
34
+ });
33
35
  return /* @__PURE__ */ jsx(Box, __spreadValues({
34
36
  tag: "button",
35
37
  cursor: "pointer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",