ggfdgfd
This commit is contained in:
parent
f7ce559e31
commit
a4d42e67e0
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,21 @@
|
||||||
import { jsx as p } from "react/jsx-runtime";
|
import { jsx as s } from "react/jsx-runtime";
|
||||||
import { usePalette as x } from "./react-you-ui6.mjs";
|
import { usePalette as i } from "./react-you-ui6.mjs";
|
||||||
import { h as t } from "./string_utils-B4bsIQ5w.mjs";
|
import { h as m } from "./string_utils-B4bsIQ5w.mjs";
|
||||||
const d = (e) => {
|
const p = (o) => {
|
||||||
const r = x(), { href: o, target: a, rel: i, children: s, className: l, id: m, style: n, ...c } = e;
|
const r = i(), { style: e, color: t = m(r.primary), ...n } = o;
|
||||||
return /* @__PURE__ */ p(
|
return /* @__PURE__ */ s(
|
||||||
"a",
|
"a",
|
||||||
{
|
{
|
||||||
href: o,
|
|
||||||
target: a,
|
|
||||||
rel: i,
|
|
||||||
className: l,
|
|
||||||
id: m,
|
|
||||||
style: {
|
style: {
|
||||||
color: t(r.primary),
|
color: t,
|
||||||
textDecorationColor: t(r.primary),
|
textDecorationColor: t,
|
||||||
textDecoration: "underline",
|
textDecoration: "underline",
|
||||||
...n
|
...e
|
||||||
},
|
},
|
||||||
...c,
|
...n
|
||||||
children: s
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export {
|
export {
|
||||||
d as Link
|
p as Link
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ type LinkProps = AriaProps & {
|
||||||
className?: string;
|
className?: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
|
color?: string;
|
||||||
};
|
};
|
||||||
export declare const Link: (props: LinkProps) => React.JSX.Element;
|
export declare const Link: (props: LinkProps) => React.JSX.Element;
|
||||||
export {};
|
export {};
|
||||||
|
|
|
||||||
|
|
@ -11,26 +11,23 @@ type LinkProps = AriaProps & {
|
||||||
className?: string;
|
className?: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
|
|
||||||
|
color?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Link = (props: LinkProps) => {
|
export const Link = (props: LinkProps) => {
|
||||||
const palette = usePalette();
|
const palette = usePalette();
|
||||||
const { href, target, rel, children, className, id, style, ...rest } = props;
|
const { style, color = hexFromArgb(palette.primary), ...rest } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
href={href}
|
|
||||||
target={target}
|
|
||||||
rel={rel}
|
|
||||||
className={className}
|
|
||||||
id={id}
|
|
||||||
style={{
|
style={{
|
||||||
color: hexFromArgb(palette.primary),
|
color,
|
||||||
textDecorationColor: hexFromArgb(palette.primary),
|
textDecorationColor: color,
|
||||||
textDecoration: 'underline',
|
textDecoration: 'underline',
|
||||||
...style,
|
...style,
|
||||||
}}
|
}}
|
||||||
{...rest}
|
{...rest}
|
||||||
>{children}</a>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Loading…
Reference in New Issue