[new feature] Checkbox: add icon-size prop

This commit is contained in:
陈嘉涵
2019-05-08 17:36:45 +08:00
parent 1d658a9338
commit d46b6e4fde
5 changed files with 17 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
*/
import Icon from '../icon';
import { ChildrenMixin } from './relation';
import { suffixPx } from '../utils';
export const CheckboxMixin = (parent, bem) => ({
mixins: [ChildrenMixin(parent)],
@@ -10,6 +11,7 @@ export const CheckboxMixin = (parent, bem) => ({
props: {
name: null,
value: null,
iconSize: [String, Number],
disabled: Boolean,
checkedColor: String,
labelPosition: String,
@@ -61,6 +63,7 @@ export const CheckboxMixin = (parent, bem) => ({
>
<div
class={bem('icon', [this.shape, { disabled: this.isDisabled, checked }])}
style={{ fontSize: suffixPx(this.iconSize) }}
onClick={this.onClickIcon}
>
{CheckIcon}