Skip to content

Commit

Permalink
fix: add support to sknui-box with default flex
Browse files Browse the repository at this point in the history
  • Loading branch information
omariosouto committed Jan 20, 2022
1 parent 4314672 commit 3d3d279
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/components/box/box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ interface BoxProps {
ref: Ref<unknown>;
}

export const Box = React.forwardRef(({ tag, ...props }: BoxProps, ref) => {
return <BoxBase as={tag} {...props} ref={ref} />;
});
export const Box = React.forwardRef(
({ tag, className, ...props }: BoxProps, ref) => {
return (
<BoxBase
as={tag}
className={`${className} sknui-box`}
{...props}
ref={ref}
/>
);
}
);

Box.defaultProps = {
tag: 'div',
Expand Down
5 changes: 5 additions & 0 deletions lib/components/provider/react/CSSReset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ Add the correct display in Chrome and Safari.
--tw-border-opacity: 1;
border-color: rgba(229, 231, 235, var(--tw-border-opacity));
}
/** SkynexUI Styles */
.sknui-box {
display: flex;
}
`}</style>
);
}

3 comments on commit 3d3d279

@vercel
Copy link

@vercel vercel bot commented on 3d3d279 Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sknui-demobase-react – ./examples/demo_base

sknui-demobase-react.vercel.app
sknui-demobase-react-skynexui.vercel.app
sknui-demobase-react-git-main-skynexui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 3d3d279 Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3d3d279 Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.