From a4d42e67e09cb7915f9dd7508149ec22e897b28f Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Thu, 3 Apr 2025 11:08:30 +0500 Subject: [PATCH] ggfdgfd --- dist/react-you-ui5.js | 2 +- dist/react-you-ui5.mjs | 28 +++++++++++----------------- dist/src/components/Link.d.ts | 1 + src/components/Link.tsx | 15 ++++++--------- 4 files changed, 19 insertions(+), 27 deletions(-) diff --git a/dist/react-you-ui5.js b/dist/react-you-ui5.js index 102611e..4ad8fd2 100644 --- a/dist/react-you-ui5.js +++ b/dist/react-you-ui5.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),g=require("./react-you-ui6.js"),r=require("./string_utils-Bad7L8P5.js"),h=t=>{const e=g.usePalette(),{href:o,target:s,rel:i,children:n,className:l,id:c,style:a,...u}=t;return m.jsx("a",{href:o,target:s,rel:i,className:l,id:c,style:{color:r.hexFromArgb(e.primary),textDecorationColor:r.hexFromArgb(e.primary),textDecoration:"underline",...a},...u,children:n})};exports.Link=h; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./react-you-ui6.js"),u=require("./string_utils-Bad7L8P5.js"),c=t=>{const r=i.usePalette(),{style:o,color:e=u.hexFromArgb(r.primary),...s}=t;return n.jsx("a",{style:{color:e,textDecorationColor:e,textDecoration:"underline",...o},...s})};exports.Link=c; diff --git a/dist/react-you-ui5.mjs b/dist/react-you-ui5.mjs index c2effa6..7eb94ce 100644 --- a/dist/react-you-ui5.mjs +++ b/dist/react-you-ui5.mjs @@ -1,27 +1,21 @@ -import { jsx as p } from "react/jsx-runtime"; -import { usePalette as x } from "./react-you-ui6.mjs"; -import { h as t } from "./string_utils-B4bsIQ5w.mjs"; -const d = (e) => { - const r = x(), { href: o, target: a, rel: i, children: s, className: l, id: m, style: n, ...c } = e; - return /* @__PURE__ */ p( +import { jsx as s } from "react/jsx-runtime"; +import { usePalette as i } from "./react-you-ui6.mjs"; +import { h as m } from "./string_utils-B4bsIQ5w.mjs"; +const p = (o) => { + const r = i(), { style: e, color: t = m(r.primary), ...n } = o; + return /* @__PURE__ */ s( "a", { - href: o, - target: a, - rel: i, - className: l, - id: m, style: { - color: t(r.primary), - textDecorationColor: t(r.primary), + color: t, + textDecorationColor: t, textDecoration: "underline", - ...n + ...e }, - ...c, - children: s + ...n } ); }; export { - d as Link + p as Link }; diff --git a/dist/src/components/Link.d.ts b/dist/src/components/Link.d.ts index ef40e84..c03eb25 100644 --- a/dist/src/components/Link.d.ts +++ b/dist/src/components/Link.d.ts @@ -9,6 +9,7 @@ type LinkProps = AriaProps & { className?: string; id?: string; style?: React.CSSProperties; + color?: string; }; export declare const Link: (props: LinkProps) => React.JSX.Element; export {}; diff --git a/src/components/Link.tsx b/src/components/Link.tsx index be2b33a..abc3adf 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -11,26 +11,23 @@ type LinkProps = AriaProps & { className?: string; id?: string; style?: React.CSSProperties; + + color?: string; }; export const Link = (props: LinkProps) => { const palette = usePalette(); - const { href, target, rel, children, className, id, style, ...rest } = props; + const { style, color = hexFromArgb(palette.primary), ...rest } = props; return ( {children} + /> ); }; \ No newline at end of file