[improvement] Switch: tsx (#2784)

This commit is contained in:
neverland
2019-02-18 20:36:12 +08:00
committed by GitHub
parent f211afe714
commit e860759f16
2 changed files with 31 additions and 7 deletions

View File

@@ -2,18 +2,29 @@
* Common Switch Props
*/
export type SharedSwitchProps = {
size?: string;
value?: any;
loading?: boolean;
disabled?: boolean;
activeValue?: any;
inactiveValue?: any;
activeColor?: string;
inactiveColor?: string;
};
export const switchProps = {
value: null,
value: null as any,
loading: Boolean,
disabled: Boolean,
activeColor: String,
inactiveColor: String,
activeValue: {
type: null,
type: null as any,
default: true
},
inactiveValue: {
type: null,
type: null as any,
default: false
},
size: {