UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

31 lines (26 loc) 1.05 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var createMemoStyles = require('../../theme/create-memo-styles.js'); var getSizeValue = require('../../theme/utils/get-size-value/get-size-value.js'); const POSITIONS = { left: "flex-start", center: "center", right: "flex-end", apart: "space-between" }; var useStyles = createMemoStyles.createMemoStyles({ root: ({ spacing, position, noWrap, direction, theme, grow, align }) => ({ display: "flex", flexDirection: direction, alignItems: align || (direction === "row" ? "center" : grow ? "stretch" : POSITIONS[position]), flexWrap: noWrap ? "nowrap" : "wrap", justifyContent: direction === "row" && POSITIONS[position], margin: -1 * getSizeValue.getSizeValue({ size: spacing, sizes: theme.spacing }) / 2 }), child: ({ grow, spacing, theme }) => ({ flexGrow: grow ? 1 : 0, margin: getSizeValue.getSizeValue({ size: spacing, sizes: theme.spacing }) / 2 }) }); exports.default = useStyles; //# sourceMappingURL=Group.styles.js.map