UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

48 lines (47 loc) 1.53 kB
"use client"; import { getSpacing } from "../../core/utils/get-size/get-size.mjs"; import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs"; import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs"; import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs"; import { factory } from "../../core/factory/factory.mjs"; import { Box } from "../../core/Box/Box.mjs"; import Stack_module_default from "./Stack.module.mjs"; import { jsx } from "react/jsx-runtime"; //#region packages/@mantine/core/src/components/Stack/Stack.tsx const defaultProps = { gap: "md", align: "stretch", justify: "flex-start" }; const varsResolver = createVarsResolver((_, { gap, align, justify }) => ({ root: { "--stack-gap": getSpacing(gap), "--stack-align": align, "--stack-justify": justify } })); const Stack = factory((_props) => { const props = useProps("Stack", defaultProps, _props); const { classNames, className, style, styles, unstyled, vars, align, justify, gap, variant, attributes, ...others } = props; return /* @__PURE__ */ jsx(Box, { ...useStyles({ name: "Stack", props, classes: Stack_module_default, className, style, classNames, styles, unstyled, attributes, vars, varsResolver })("root"), variant, ...others }); }); Stack.classes = Stack_module_default; Stack.varsResolver = varsResolver; Stack.displayName = "@mantine/core/Stack"; //#endregion export { Stack }; //# sourceMappingURL=Stack.mjs.map