@cronocode/react-box 1.1.6 → 1.1.9

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.
package/box.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import React, { Ref } from 'react';
2
2
  import { BoxStyles } from './types';
3
3
  import ClassNameUtils from './utils/className/classNameUtils';
4
- declare type AllProps<TTag extends keyof React.ReactHTML> = React.ComponentProps<TTag>;
5
- declare type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<AllProps<TTag>, 'className' | 'style' | 'ref'>;
4
+ type AllProps<TTag extends keyof React.ReactHTML> = React.ComponentProps<TTag>;
5
+ type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<AllProps<TTag>, 'className' | 'style' | 'ref'>;
6
6
  interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles {
7
7
  children?: React.ReactNode | ((props: {
8
8
  isHover: boolean;
package/box.mjs CHANGED
@@ -2,7 +2,7 @@ import x, { forwardRef as N, useState as v } from "react";
2
2
  import { c as a } from "./box.module.css.mjs";
3
3
  import { C as b, t as g } from "./utils/utils.mjs";
4
4
  function C(c, n) {
5
- const { tag: p, children: e, props: d, className: r, style: l } = c, t = r ? b.classNames(r, a.box) : [a.box];
5
+ const { tag: p, children: e, props: d, className: r, style: l } = c, t = r ? b.classNames(a.box, r) : [a.box];
6
6
  Object.entries(c).forEach(([o, m]) => {
7
7
  const u = a[o + m];
8
8
  u ? t.push(u) : g.includes(o) && t.push(`${o}${m}`);