mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
* added storybook * added avatar component * added button story * added dropdown button story * removed unused ellipsis component * cleaned up modal path * reorganized enroll secrets table file * added flash story; removed unused persistent flash * added fleet ace story * added checkbox story * added dropdown story * added input story * fixed storybook build * fixed avatar * added input with icon story * added radio button story * added select targets dropdown story * added slider story * added tooltip story * added info banner story * removed unused loaders; added spinner story * added modal story * removed unused NumberPill * added pagination story * lint fixes * added documentation to run * modified documentation * fixed corelayout test * fixed format for date-fns * fixed date format that breaks tests * wait for page
33 lines
568 B
TypeScript
33 lines
568 B
TypeScript
import React from "react";
|
|
|
|
export interface ISpinnerProps {
|
|
isInButton?: boolean;
|
|
}
|
|
|
|
const baseClass = "loading-spinner";
|
|
|
|
const Spinner = ({ isInButton }: ISpinnerProps): JSX.Element => {
|
|
if (isInButton) {
|
|
return (
|
|
<div className="ring ring-for-button">
|
|
<div />
|
|
<div />
|
|
<div />
|
|
<div />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className={baseClass}>
|
|
<div className={`${baseClass}__ring`}>
|
|
<div />
|
|
<div />
|
|
<div />
|
|
<div />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Spinner;
|