@j2inn/app-react
Version:
React implementation of the j2inn-app framework
16 lines (15 loc) • 605 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Container, Spin } from '@j2inn/ui';
const containerStyle = {
flex: '1 1 auto',
minWidth: 300,
minHeight: 300,
};
const Loading = ({ children, style, padded = false, delay = 666, immediate, ...props }) => {
const spinner = (_jsx(Spin, { delay: immediate ? 0 : delay, style: style, ...props, children: children }));
if (padded) {
return (_jsx(Container, { middle: true, center: true, style: { ...containerStyle, ...style }, ...props, children: spinner }));
}
return spinner;
};
export { Loading };