Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// import './style/Divider.styl'
import {
FALSE,
RAW_STRING,
RAW_BOOLEAN,
RAW_LEFT,
RAW_RIGHT,
RAW_CENTER,
} from '../constant'
import {
oneOf,
} from '../util'
export default Yox.define({
template,
name: '${prefix}Divider',
propTypes: {
vertical: {
type: RAW_BOOLEAN,
value: FALSE,
},
dashed: {
type: RAW_BOOLEAN,
value: FALSE,
},
align: {
type: oneOf([RAW_CENTER, RAW_LEFT, RAW_RIGHT]),
import Yox from 'yox'
import template from './template/Exception.hbs'
// import './style/Exception.styl'
import {
RAW_STRING,
} from '../constant'
import {
oneOf,
} from '../util'
export default Yox.define({
template,
name: '${prefix}Exception',
propTypes: {
title: {
type: RAW_STRING,
},
subTitle: {
type: RAW_STRING,
},
status: {
type: oneOf([403, 404, 500]),
},
className: {
RAW_BOOLEAN,
RAW_DEFAULT,
} from '../constant'
import {
oneOf,
} from '../util'
interface Tab {
name: string,
icon: string,
label: string,
disabled: boolean,
}
export default Yox.define({
template,
name: '${prefix}Tabs',
propTypes: {
type: {
type: oneOf(['card']),
},
size: {
type: oneOf([RAW_DEFAULT, RAW_SMALL, RAW_LARGE]),
value: RAW_DEFAULT,
},
closable: {
type: RAW_BOOLEAN,
value: FALSE,
import Yox from 'yox';
import template from './template/Divider.hbs';
import { FALSE, RAW_STRING, RAW_BOOLEAN, RAW_LEFT, RAW_RIGHT, RAW_CENTER, RAW_VERTICAL, RAW_HORIZONTAL, } from '../constant';
import { oneOf, } from '../util';
export default Yox.define({
propTypes: {
type: {
type: oneOf([RAW_HORIZONTAL, RAW_VERTICAL]),
value: RAW_HORIZONTAL
},
dashed: {
type: RAW_BOOLEAN,
value: FALSE
},
align: {
type: oneOf([RAW_CENTER, RAW_LEFT, RAW_RIGHT]),
value: RAW_CENTER
},
className: {
type: RAW_STRING
},
import Yox from 'yox';
import template from './template/Col.hbs';
import { RAW_STRING, RAW_NUMERIC, RAW_OBJECT } from '../constant';
import { findComponentUpward } from '../util';
export default Yox.define({
propTypes: {
span: {
type: RAW_NUMERIC
},
order: {
type: RAW_NUMERIC
},
offset: {
type: RAW_NUMERIC
},
push: {
type: RAW_NUMERIC
},
pull: {
type: RAW_NUMERIC
},
TRUE,
FALSE,
RAW_STRING,
RAW_BOOLEAN,
RAW_FUNCTION,
RAW_TYPE_ARRAY,
RAW_TYPE_PRIMARY,
RAW_NUMERIC,
} from '../constant'
import {
oneOf,
screenWidth,
} from '../util'
export default Yox.define({
template,
name: '${prefix}Confirm',
propTypes: {
title: {
type: RAW_STRING,
},
content: {
type: RAW_STRING,
required: TRUE,
},
closable: {
type: RAW_BOOLEAN,
value: FALSE,
import Icon from '../icon/Icon'
import template from './template/CollapseItem.hbs'
import {
TRUE,
FALSE,
RAW_STRING,
RAW_BOOLEAN,
RAW_NUMBER,
} from '../constant'
import {
findComponentUpward,
} from '../util'
export default Yox.define({
template,
name: '${prefix}CollapseItem',
propTypes: {
title: {
type: RAW_STRING,
required: TRUE,
},
name: {
type: [RAW_STRING, RAW_NUMBER],
required: TRUE,
},
disabled: {
type: RAW_BOOLEAN,
import Yox from 'yox';
import template from './template/TimePicker.hbs';
import { RAW_STRING, RAW_NUMBER, RAW_FUNCTION, } from '../constant';
export default Yox.define({
propTypes: {
unit: {
type: RAW_STRING,
value: '分'
},
onChange: {
type: RAW_FUNCTION
},
tens: {
type: RAW_NUMBER,
value: 0
},
ones: {
type: RAW_NUMBER,
value: 0
}
import Yox from 'yox';
import template from './template/Badge.hbs';
import { FALSE, RAW_STRING, RAW_BOOLEAN, RAW_NUMERIC, RAW_TYPE_ARRAY, RAW_TYPE_ERROR, } from '../constant';
import { oneOf, } from '../util';
export default Yox.define({
propTypes: {
text: {
type: RAW_STRING
},
count: {
type: RAW_NUMERIC
},
maxCount: {
type: RAW_NUMERIC,
value: 999
},
dot: {
type: RAW_BOOLEAN,
value: FALSE
},
hidden: {
import Yox from 'yox'
import template from './template/CardBody.hbs'
import {
RAW_STRING,
} from '../constant'
export default Yox.define({
template,
name: '${prefix}CardBody',
propTypes: {
className: {
type: RAW_STRING,
},
style: {
type: RAW_STRING,
}
},
})