@knowmax/genericlist-fluentuiv9
Version:
Knowmax Generic list with basic CRUD support with Fluent V9 user interface implementation.
21 lines (20 loc) • 763 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Spinner } from '@fluentui/react-spinner';
import { makeStyles, shorthands } from '@griffel/react';
import { tokens } from '@fluentui/tokens';
const useClasses = makeStyles({
root: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
...shorthands.padding(tokens.spacingHorizontalL)
},
spinner: {
position: 'absolute'
}
});
/** Displays loader while performing lengthy operation. */
export const Loader = ({ size }) => {
const classes = useClasses();
return (_jsx("div", { className: classes.root, children: _jsx(Spinner, { className: classes.spinner, size: size === 'sm' ? 'tiny' : size === 'lg' ? 'huge' : 'medium' }) }));
};