@kwiz/fluentui
Version:
KWIZ common controls for FluentUI
15 lines • 898 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Caption1 } from '@fluentui/react-components';
import { isNotEmptyString, LOGO_ANIM_DARK, LOGO_ANIM_LIGHT } from '@kwiz/common';
import { useKWIZFluentContext } from '../helpers/context-internal';
import { Centered } from './centered';
import { Horizontal } from './horizontal';
import { Vertical } from './vertical';
export const Loading = (props) => {
const ctx = useKWIZFluentContext();
const src = props.dark === true || ctx.dark
? LOGO_ANIM_DARK
: LOGO_ANIM_LIGHT;
return _jsx(Centered, Object.assign({}, props, { children: _jsxs(Vertical, { children: [_jsx("img", { src: src, alt: "loading", style: { width: '15vw' } }), isNotEmptyString(props.label) && _jsx(Horizontal, { hCentered: true, children: _jsx(Caption1, { children: props.label }) })] }) }));
};
//# sourceMappingURL=loading.js.map