@slashid/docusaurus-theme-slashid
Version:
SlashID theme for Docusaurus.
37 lines (35 loc) • 1.02 kB
JavaScript
/* ============================================================================
* Copyright (c) SlashID
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* ========================================================================== */
import React from "react";
import css from "./spinner.module.css";
export let SpinnerColorType;
(function (SpinnerColorType) {
SpinnerColorType["Light"] = "light";
SpinnerColorType["Blue"] = "blue";
})(SpinnerColorType || (SpinnerColorType = {}));
const Spinner = ({ color, isBig, size }) => {
return (
<div
className={`${css.host} ${css[color]} ${isBig ? css.big : ""}`}
style={{
width: `${size}px`,
height: `${size}px`,
}}
>
{[...Array(4)].map((_, i) => (
<div
key={i}
style={{
width: `${size}px`,
height: `${size}px`,
}}
/>
))}
</div>
);
};
export default Spinner;