@kwiz/fluentui
Version:
KWIZ common controls for FluentUI
34 lines • 1.15 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { makeStyles } from '@fluentui/react-components';
import { isNotEmptyArray } from '@kwiz/common';
import React from 'react';
import { KnownClassNames, mixins } from '../styles/styles';
import { Section } from './section';
const useStyles = makeStyles({
horizontal: Object.assign(Object.assign({}, mixins.flex), { flexDirection: 'row' }),
wrap: mixins.wrap,
nogap: mixins.nogap,
centered: {
alignItems: "center"
},
hCentered: {
justifyContent: "center"
},
});
export const Horizontal = React.forwardRef((props, ref) => {
const cssNames = useStyles();
let css = [KnownClassNames.horizontal];
css.push(cssNames.horizontal);
if (props.wrap)
css.push(cssNames.wrap);
if (props.nogap)
css.push(cssNames.nogap);
if (props.centered)
css.push(cssNames.centered);
if (props.hCentered)
css.push(cssNames.hCentered);
if (isNotEmptyArray(props.css))
css.push(...props.css);
return (_jsx(Section, Object.assign({}, props, { css: css, ref: ref })));
});
//# sourceMappingURL=horizontal.js.map