Skip to content

Allow custom component for button links #260

@mikemonteith

Description

@mikemonteith

I can pass a custom component to the back link, to get it to use react-router's Link.

import { BackLink } from "nhsuk-react-components";
import { Link } from "react-router-dom";
...

<BackLink asElement={Link} to="..">
  Back
</BackLink>

It would be nice if <ButtonLink> also supported this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions