UNPKG

@activecollab/components

Version:

ActiveCollab Components

33 lines 1.84 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; const _excluded = ["radius", "stroke", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"]; import React, { forwardRef } from "react"; import { StyledSpinnerLoader } from "./Styles"; export const SpinnerLoader = /*#__PURE__*/forwardRef((_ref, ref) => { let _ref$radius = _ref.radius, radius = _ref$radius === void 0 ? 10 : _ref$radius, _ref$stroke = _ref.stroke, stroke = _ref$stroke === void 0 ? 2 : _ref$stroke, _ref$activeStrokeColo = _ref.activeStrokeColor, activeStrokeColor = _ref$activeStrokeColo === void 0 ? "var(--color-secondary)" : _ref$activeStrokeColo, _ref$inactiveStrokeCo = _ref.inactiveStrokeColor, inactiveStrokeColor = _ref$inactiveStrokeCo === void 0 ? "var(--color-theme-transparent-300)" : _ref$inactiveStrokeCo, _ref$activeColorPerce = _ref.activeColorPercentage, activeColorPercentage = _ref$activeColorPerce === void 0 ? "25%" : _ref$activeColorPerce, _ref$rotateDurationIn = _ref.rotateDurationInSeconds, rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn, className = _ref.className, rest = _objectWithoutPropertiesLoose(_ref, _excluded); return /*#__PURE__*/React.createElement(StyledSpinnerLoader, _extends({ ref: ref, className: className, $diameter: radius * 2, $stroke: stroke, $activeStrokeColor: activeStrokeColor, $inactiveStrokeColor: inactiveStrokeColor, $activeColorPercentage: activeColorPercentage, $rotateDurationInSeconds: rotateDurationInSeconds }, rest)); }); SpinnerLoader.displayName = "SpinnerLoader"; //# sourceMappingURL=SpinnerLoader.js.map