UNPKG

react-spinners-css

Version:

[![bit components](https://img.shields.io/badge/bit_components-14-6e3991)](https://bit.cloud/joshk/react-spinners-css) [![npm version](https://badge.fury.io/js/react-spinners-css.svg)](https://www.npmjs.com/package/react-spinners-css) [![GitHub stars](htt

30 lines 1.65 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Heart = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const classnames_1 = __importDefault(require("classnames")); const style_module_css_1 = __importDefault(require("./style.module.css")); function Heart({ color = '#7f58af', size = 80, className, style, ...rest }) { return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(style_module_css_1.default['lds-heart'], className), style: { width: size, height: size, ...style }, ...rest, children: (0, jsx_runtime_1.jsxs)("div", { style: { background: color, width: size * 0.4, height: size * 0.4, left: size * 0.3, top: size * 0.3, }, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(style_module_css_1.default['div-before']), style: { background: color, width: size * 0.4, height: size * 0.4, left: -size * 0.3, } }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(style_module_css_1.default['div-after']), style: { background: color, width: size * 0.4, height: size * 0.4, top: -size * 0.3, } })] }) })); } exports.Heart = Heart; //# sourceMappingURL=heart.js.map