无选项样式优化

This commit is contained in:
2betop 2020-05-27 20:09:39 +08:00
parent 4f7a0bfa62
commit aef41bace7
4 changed files with 18 additions and 10 deletions

View File

@ -382,3 +382,12 @@
}
}
}
@mixin checkboxes-placeholder {
height: $Form-input-height;
line-height: $Form-input-lineHeight;
font-size: $Form-input-fontSize;
padding: ($Form-input-height - $Form-input-lineHeight * $Form-input-fontSize)/2
$gap-sm;
color: $text--muted-color;
}

View File

@ -279,15 +279,6 @@
display: block;
}
@mixin checkboxes-placeholder {
height: $Form-input-height;
line-height: $Form-input-lineHeight;
font-size: $Form-input-fontSize;
padding: ($Form-input-height - $Form-input-lineHeight * $Form-input-fontSize)/2
$gap-sm;
color: $text--muted-color;
}
.#{$ns}Checkboxes {
> .#{$ns}Checkbox {
display: block;

View File

@ -164,6 +164,10 @@
// .#{$ns}Transfer-result {
// flex-grow: unset;
// }
&-placeholder {
@include checkboxes-placeholder();
}
}
.#{$ns}TransferControl {

View File

@ -89,7 +89,11 @@ export class TabsTransfer extends React.Component<TabsTransferProps> {
} = this.props;
if (!Array.isArray(options) || !options.length) {
return <div>{placeholder || '暂无可选项'}</div>;
return (
<div className={cx('TabsTransfer-placeholder')}>
{placeholder || '暂无可选项'}
</div>
);
}
return (