Skip to content

Commit

Permalink
fix: Box typing
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Jan 15, 2025
1 parent c89c84b commit 2122a22
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions packages/react/src/components/Box/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import type {
ColorFg,
ColorPalette,
ColorStroke,
HorizontalSpacing,
Dimension,
Radius,
Unit,
} from "@seed-design/vars";
import { vars } from "@seed-design/vars";
import clsx from "clsx";
Expand Down Expand Up @@ -76,17 +75,17 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {

borderBottomLeftRadius?: Radius;

width?: Unit | "full" | (string & {});
width?: Dimension | "full" | (string & {});

minWidth?: Unit | "full" | (string & {});
minWidth?: Dimension | "full" | (string & {});

maxWidth?: Unit | "full" | (string & {});
maxWidth?: Dimension | "full" | (string & {});

height?: Unit | "full" | (string & {});
height?: Dimension | "full" | (string & {});

minHeight?: Unit | "full" | (string & {});
minHeight?: Dimension | "full" | (string & {});

maxHeight?: Unit | "full" | (string & {});
maxHeight?: Dimension | "full" | (string & {});

top?: 0;

Expand All @@ -96,19 +95,19 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {

bottom?: 0;

padding?: Unit;
padding?: Dimension;

paddingX?: Unit | HorizontalSpacing;
paddingX?: Dimension;

paddingY?: Unit;
paddingY?: Dimension;

paddingTop?: Unit;
paddingTop?: Dimension;

paddingRight?: Unit | HorizontalSpacing;
paddingRight?: Dimension;

paddingBottom?: Unit;
paddingBottom?: Dimension;

paddingLeft?: Unit | HorizontalSpacing;
paddingLeft?: Dimension;

display?: "block" | "flex" | "inline-flex" | "inline" | "inline-block" | "none";

Expand All @@ -134,7 +133,7 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {

alignContent?: "flex-start" | "flex-end" | "center" | "stretch";

gap?: Unit | HorizontalSpacing;
gap?: Dimension;
}

export const Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
Expand Down

0 comments on commit 2122a22

Please sign in to comment.