@norges-domstoler/dds-components 22.4.0 → 22.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3443,9 +3443,11 @@ type LinkProps<T extends ElementType = 'a'> = PolymorphicBaseComponentProps<T, {
|
|
|
3443
3443
|
withVisited?: boolean;
|
|
3444
3444
|
/**Spesifiserer typografistil basert på utvalget for brødtekst. Arver hvis ikke oppgitt. */
|
|
3445
3445
|
typographyType?: TypographyBodyType;
|
|
3446
|
+
/**Tvinger komponenten til å behandle `as` som en anchor tag wrapper og forwarde anchor-spesifikke props (target, rel). Bruk når custom `as` komponent wrapper en `<a>` tag. */
|
|
3447
|
+
isAnchor?: boolean;
|
|
3446
3448
|
} & BaseTypographyProps & PickedHTMLAttributes$2>;
|
|
3447
3449
|
declare const Link: {
|
|
3448
|
-
<T extends ElementType = "a">({ id, className, htmlProps, children, typographyType, withMargins, withVisited, external, target, style, color, as: propAs, ...rest }: LinkProps<T>): react_jsx_runtime.JSX.Element;
|
|
3450
|
+
<T extends ElementType = "a">({ id, className, htmlProps, children, typographyType, withMargins, withVisited, external, target, style, color, as: propAs, isAnchor: propIsAnchor, ...rest }: LinkProps<T>): react_jsx_runtime.JSX.Element;
|
|
3449
3451
|
displayName: string;
|
|
3450
3452
|
};
|
|
3451
3453
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3443,9 +3443,11 @@ type LinkProps<T extends ElementType = 'a'> = PolymorphicBaseComponentProps<T, {
|
|
|
3443
3443
|
withVisited?: boolean;
|
|
3444
3444
|
/**Spesifiserer typografistil basert på utvalget for brødtekst. Arver hvis ikke oppgitt. */
|
|
3445
3445
|
typographyType?: TypographyBodyType;
|
|
3446
|
+
/**Tvinger komponenten til å behandle `as` som en anchor tag wrapper og forwarde anchor-spesifikke props (target, rel). Bruk når custom `as` komponent wrapper en `<a>` tag. */
|
|
3447
|
+
isAnchor?: boolean;
|
|
3446
3448
|
} & BaseTypographyProps & PickedHTMLAttributes$2>;
|
|
3447
3449
|
declare const Link: {
|
|
3448
|
-
<T extends ElementType = "a">({ id, className, htmlProps, children, typographyType, withMargins, withVisited, external, target, style, color, as: propAs, ...rest }: LinkProps<T>): react_jsx_runtime.JSX.Element;
|
|
3450
|
+
<T extends ElementType = "a">({ id, className, htmlProps, children, typographyType, withMargins, withVisited, external, target, style, color, as: propAs, isAnchor: propIsAnchor, ...rest }: LinkProps<T>): react_jsx_runtime.JSX.Element;
|
|
3449
3451
|
displayName: string;
|
|
3450
3452
|
};
|
|
3451
3453
|
|
package/dist/index.js
CHANGED
|
@@ -4407,10 +4407,11 @@ var Link = ({
|
|
|
4407
4407
|
style,
|
|
4408
4408
|
color,
|
|
4409
4409
|
as: propAs,
|
|
4410
|
+
isAnchor: propIsAnchor,
|
|
4410
4411
|
...rest
|
|
4411
4412
|
}) => {
|
|
4412
4413
|
const as = propAs ? propAs : "a";
|
|
4413
|
-
const isAnchor = as === "a";
|
|
4414
|
+
const isAnchor = as === "a" || propIsAnchor;
|
|
4414
4415
|
const aProps = isAnchor ? {
|
|
4415
4416
|
rel: "noopener noreferrer",
|
|
4416
4417
|
target: external ? "_blank" : target
|