UNPKG

shineout

Version:

Shein 前端组件库

40 lines (39 loc) 956 B
import _extends from "@babel/runtime/helpers/extends"; import React from 'react'; import Spin from './Spin'; import { ringClass, planeClass, pulseClass } from './styles'; import { formatSize } from './util'; export function Ring(obj) { var _formatSize = formatSize(obj.size), value = _formatSize.value, unit = _formatSize.unit; var style = { borderWidth: value / 10 + unit, borderTopColor: obj.color }; return React.createElement(Spin, _extends({}, obj, { count: 0, style: style, spinClass: ringClass })); } export function Plane(obj) { var style = { backgroundColor: obj.color }; return React.createElement(Spin, _extends({}, obj, { count: 0, style: style, spinClass: planeClass })); } export function Pulse(obj) { var style = { backgroundColor: obj.color }; return React.createElement(Spin, _extends({}, obj, { count: 0, style: style, spinClass: pulseClass })); }