@purpurds/link
v4.3.0
Published
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
Downloads
2,170
Readme
import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";
import * as LinkStories from "./src/link.stories"; import packageInfo from "./package.json";
Link
Version {packageInfo.version}
Showcase
Properties
Installation
Via NPM
Add the dependency to your consumer app like "@purpurds/purpur": "^x.y.z"
In MyApp.tsx
import "@purpurds/purpur/styles";
In MyComponent.tsx
With a custom anchor (e.g. NextJS) as children
import { Link } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Link>
<CustomAnchor>Some content</CustomAnchor>
</Link>
);
};
Without an anchor as children
import { Link } from "@purpurds/purpur";
export const MyComponent = () => {
return (
<Link href="http://telia.se" target="_blank">
Some content
</Link>
);
};