UNPKG

@csegames/camelot-unchained

Version:

Camelot Unchained Client Library

45 lines (44 loc) 1.42 kB
"use strict"; /* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var aphrodite_1 = require("aphrodite"); var spin = { from: { transform: 'rotate(0deg)' }, to: { transform: 'rotate(360deg)' } }; exports.defaultSpinnerStyle = { spinner: { borderRadius: '50%', display: 'inline-block', width: '1em', height: '1em', border: '.25rem solid rgba(255, 255, 255, 0.2)', borderTopColor: '#ececec', transition: 'all .3s', animationName: spin, WebkitAnimationName: spin, animationDuration: '1s', WebkitAnimationDuration: '1s', animationIterationCount: 'infinite', WebkitAnimatiionIterationCount: 'infinite', WebkitBackfaceVisibility: 'hidden', ':hover': { borderTopColor: '#3fd0b0' } } }; exports.Spinner = function (props) { var ss = aphrodite_1.StyleSheet.create(exports.defaultSpinnerStyle); var custom = aphrodite_1.StyleSheet.create(props.styles || {}); return React.createElement("div", { className: aphrodite_1.css(ss.spinner, custom.spinner) }); }; exports.default = exports.Spinner;