@nordcom/nordstar-accented
Version:
Highlight text with an accent color.
25 lines (24 loc) • 663 B
JavaScript
import "react";
import { jsx } from "react/jsx-runtime";
import { forwardRef, cn } from "@nordcom/nordstar-system";
const Accented = forwardRef(
({ as: Tag = "span", color = "default", className, ...props }, ref) => /* @__PURE__ */ jsx(
Tag,
{
...props,
ref,
className: cn(
"contents",
color === "foreground" && "text-foreground",
(color === "default" || color === "primary") && "text-primary",
color === "secondary" && "text-secondary",
className
)
}
)
);
Accented.displayName = "Nordstar.Typography.Accented";
export {
Accented as default
};
//# sourceMappingURL=accented.js.map