Skip to content

Commit 3e9b0d5

Browse files
Update action link for NHS.UK frontend v10.0.0
1 parent 40098c8 commit 3e9b0d5

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

src/components/navigation/action-link/ActionLink.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ const ActionLinkComponent: FC<AsElementLink<HTMLAnchorElement>> = ({
99
className,
1010
...rest
1111
}) => (
12-
<div className="nhsuk-action-link">
13-
<Element className={classNames('nhsuk-action-link__link', className)} {...rest}>
14-
<ArrowRightCircle />
15-
<span className="nhsuk-action-link__text">{children}</span>
16-
</Element>
17-
</div>
12+
<Element className={classNames('nhsuk-action-link', className)} {...rest}>
13+
<ArrowRightCircle />
14+
<span className="nhsuk-action-link__text">{children}</span>
15+
</Element>
1816
);
1917

2018
export default ActionLinkComponent;

src/components/navigation/action-link/__tests__/__snapshots__/ActionLink.test.tsx.snap

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,28 @@
22

33
exports[`ActionLink matches snapshot: ActionLink 1`] = `
44
<div>
5-
<div
5+
<a
66
class="nhsuk-action-link"
7+
href="/test"
78
>
8-
<a
9-
class="nhsuk-action-link__link"
10-
href="/test"
9+
<svg
10+
aria-hidden="true"
11+
class="nhsuk-icon nhsuk-icon--arrow-right-circle"
12+
focusable="false"
13+
height="16"
14+
viewBox="0 0 24 24"
15+
width="16"
16+
xmlns="http://www.w3.org/2000/svg"
1117
>
12-
<svg
13-
aria-hidden="true"
14-
class="nhsuk-icon nhsuk-icon--arrow-right-circle"
15-
focusable="false"
16-
height="16"
17-
viewBox="0 0 24 24"
18-
width="16"
19-
xmlns="http://www.w3.org/2000/svg"
20-
>
21-
<path
22-
d="M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z"
23-
/>
24-
</svg>
25-
<span
26-
class="nhsuk-action-link__text"
27-
>
28-
Test
29-
</span>
30-
</a>
31-
</div>
18+
<path
19+
d="M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z"
20+
/>
21+
</svg>
22+
<span
23+
class="nhsuk-action-link__text"
24+
>
25+
Test
26+
</span>
27+
</a>
3228
</div>
3329
`;

0 commit comments

Comments
 (0)