Spinner
Reference
- The
Spinnercomponent is a styled<div>. - It displays a circular loading spinner with customizable size and colors, animated with a spinning effect.
Props
-
spinnerSize- Type:
string - Description: Sets the size (width and height) of the spinner explicitly.
- Type:
-
smallest- Type:
boolean - Description: If
true, sets the spinner size to0.8rem.
- Type:
-
small- Type:
boolean - Description: If
true, sets the spinner size to1.2rem.
- Type:
-
Theme Colors
theme.colorPalette.SECONDARY_LIGHTER: Sets the border color for the spinner.theme.colorPalette.SECONDARY_DARK: Sets the border-left color for the spinner to create the spinning effect.
Usage Example
function Example(pageContext) {
const { protrakComponents } = React.useContext(customWidgetContext);
const { Spinner } = protrakComponents;
return(
<Spinner spinnerSize="3rem" />
);
}
- This renders a spinner with a size of
3remand theme-based colors.