@trail-ui/react
Version:
25 lines (23 loc) • 626 B
JavaScript
// src/link/link.tsx
import { link } from "@trail-ui/theme";
import { forwardRef, useMemo } from "react";
import { Link as AriaLink } from "react-aria-components";
import { jsx } from "react/jsx-runtime";
function Link(props, ref) {
const { className, size, color, underline, isBlock, ...otherProps } = props;
const styles = useMemo(
() => link({
size,
color,
underline,
isBlock,
className
}),
[className, color, isBlock, size, underline]
);
return /* @__PURE__ */ jsx(AriaLink, { className: styles, ...otherProps, ref });
}
var _Link = forwardRef(Link);
export {
_Link
};