@vygruppen/spor-link-react
v1.0.4
Published
Easy to use links in a few different designs
Downloads
29
Keywords
Readme
Link (React)
Easy to use links in a few different designs
Installation
$ npm install @vygruppen/spor-link-react
Usage
import { Link } from "@vygruppen/spor-link-react";
Basic usage is just like a good ol' <a />
tag:
<Link href="https://vy.no">Go to Vy</Link>
You can specify a variant too - primary
, secondary
or tertiary
:
<Link href="https://vy.no" variant="secondary">
Go to Vy
</Link>
If you specify an external URL, or if you pass the isExternal
flag, you will get a "link out" icon.
<Link href="https://vy.no">Go to Vy</Link>
If you're passing an external link, but you want it to look like you didn't, you can override this behavior by specifying isExternal={false}
. But don't do that.
Development
Please refer to the root readme for development notes.