Commit 5ee2bd8c authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加 border 属性

parent ef00c8c7
......@@ -18,11 +18,13 @@ const RowLayout = styled(props => <Row justify='end' {...props}/>)`
const FlagBox = styled(props => <div {...props}/>)`
.flag-box-title {
padding-left: ${themeConfig['@padding-xs']};
margin-bottom: ${themeConfig['@margin-lg']};
line-height: ${themeConfig['@font-size-lg']};
font-size: ${themeConfig['@font-size-lg']};
font-weight: 500;
}
.flag-box-title.border {
padding-left: ${themeConfig['@padding-xs']};
border-left: 2px solid ${themeConfig['@primary-color']};
}
`
......@@ -111,12 +113,16 @@ registerVirtualBox('LeftRightLayout', (_props) => {
registerVirtualBox('FlagBox', (_props) => {
const { children, props } = _props;
const title = props['x-component-props'] ? props['x-component-props'].title : '';
const border = props['x-component-props'] ? props['x-component-props'].border || true : true;
const wrapProps = props['x-component-props'] ? props['x-component-props'].wrapProps : {};
const titleCls = cx('flag-box-title', { 'border': border });
return (
<FlagBox
{...wrapProps}
>
<div className="flag-box-title">
<div className={titleCls}>
{title}
</div>
<div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment