) {
const { color, size, type } = props;
const style: { [key: string]: string } = { color };
if (size) {
const iconSize = addUnit(size) as string;
style.width = iconSize;
style.height = iconSize;
}
return (
{LoadingIcon(h, props)}
{LoadingText(h, props, slots)}
);
}
Loading.props = {
color: String,
size: [Number, String],
vertical: Boolean,
textSize: [Number, String],
type: {
type: String,
default: 'circular'
}
};
export default createComponent(Loading);