Skip to content

Commit

Permalink
Use LinkButton insted of Link component inside the warning bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Dec 12, 2023
1 parent f8835b1 commit 6eb0117
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/apps/loan-list/materials/utils/warning-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { FC, useId } from "react";
import IconWarning from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg";
import Link from "../../../../components/atoms/links/Link";
import LinkButton from "../../../../components/Buttons/LinkButton";

interface WarningBarProps {
linkText?: string;
Expand Down Expand Up @@ -56,14 +57,15 @@ const WarningBar: FC<WarningBarProps> = ({
{rightButtonAriaLabelText}
</span>
{rightLink && (
<Link
<LinkButton
dataCy="warning-bar-right-link"
href={rightLink}
className="btn-primary btn-filled btn-small arrow__hover--right-small"
url={rightLink}
size="small"
variant="filled"
ariaLabelledBy={labelId}
>
{rightButtonText}
</Link>
</LinkButton>
)}
</div>
)}
Expand Down

0 comments on commit 6eb0117

Please sign in to comment.