UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

27 lines (24 loc) 932 B
import { createMemoStyles } from '../../theme/create-memo-styles.js'; import { getSizeValue } from '../../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({ 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({ size: spacing, sizes: theme.spacing }) / 2 }), child: ({ grow, spacing, theme }) => ({ flexGrow: grow ? 1 : 0, margin: getSizeValue({ size: spacing, sizes: theme.spacing }) / 2 }) }); export default useStyles; //# sourceMappingURL=Group.styles.js.map