UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

52 lines (51 loc) 1.52 kB
"use client"; 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 { getMarkColor } from "./get-mark-color.mjs"; import Mark_module_default from "./Mark.module.mjs"; import { jsx } from "react/jsx-runtime"; //#region packages/@mantine/core/src/components/Mark/Mark.tsx const defaultProps = { color: "yellow" }; const varsResolver = createVarsResolver((theme, { color }) => ({ root: { "--mark-bg-dark": getMarkColor({ color, theme, defaultShade: 5 }), "--mark-bg-light": getMarkColor({ color, theme, defaultShade: 2 }) } })); const Mark = factory((_props) => { const props = useProps("Mark", defaultProps, _props); const { classNames, className, style, styles, unstyled, vars, color, variant, attributes, ...others } = props; return /* @__PURE__ */ jsx(Box, { component: "mark", variant, ...useStyles({ name: "Mark", props, className, style, classes: Mark_module_default, classNames, styles, unstyled, attributes, vars, varsResolver })("root"), ...others }); }); Mark.classes = Mark_module_default; Mark.varsResolver = varsResolver; Mark.displayName = "@mantine/core/Mark"; //#endregion export { Mark }; //# sourceMappingURL=Mark.mjs.map