@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
26 lines (25 loc) • 967 B
JavaScript
"use client";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { polymorphicFactory } from "../../core/factory/polymorphic-factory.mjs";
import { Text } from "../Text/Text.mjs";
import Anchor_module_default from "./Anchor.module.mjs";
import cx from "clsx";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Anchor/Anchor.tsx
const defaultProps = { underline: "hover" };
const Anchor = polymorphicFactory((props) => {
const { underline, className, unstyled, mod, ...others } = useProps("Anchor", defaultProps, props);
return /* @__PURE__ */ jsx(Text, {
component: "a",
className: cx({ [Anchor_module_default.root]: !unstyled }, className),
...others,
mod: [{ underline }, mod],
__staticSelector: "Anchor",
unstyled
});
});
Anchor.classes = Anchor_module_default;
Anchor.displayName = "@mantine/core/Anchor";
//#endregion
export { Anchor };
//# sourceMappingURL=Anchor.mjs.map