Skip to content

Commit

Permalink
✨ feat: 新增 hidden api
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 3, 2022
1 parent bf0b0b2 commit 406366c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/layout-kit/src/Flexbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export interface IFlexbox {
width?: number | string;
height?: number | string;
padding?: string | number | CommonSpaceNumber;
/**
* 是否隐藏内容
*/
hidden?: boolean;
}

export type FlexboxProps = IFlexbox &
Expand All @@ -32,7 +36,9 @@ export type FlexboxProps = IFlexbox &
export const Flexbox: FC<FlexboxProps> = styled.div.attrs(() => ({
className: 'layoutkit-flexbox',
}))<IFlexbox>`
display: flex;
// 是否显示
display: ${(props) => (props.hidden ? 'none' : 'flex')};
flex-direction: ${(props) => {
return getFlexDirection(props.direction, props.horizontal);
}};
Expand Down

1 comment on commit 406366c

@vercel
Copy link

@vercel vercel bot commented on 406366c Feb 3, 2022

Choose a reason for hiding this comment

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

Deployment failed with the following error:

Resource is limited - try again after in 19 minutes (more than 100, code: "api-deployments-free-per-day").

Please sign in to comment.