Skip to content

Commit 7a22a4a

Browse files
Mark LinkList as stable (#1551)
Remove `UNSAFE_` prefix from LinkList
1 parent 2c66d4c commit 7a22a4a

File tree

3 files changed

+95
-11
lines changed

3 files changed

+95
-11
lines changed

.changeset/warm-breads-type.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
"@obosbbl/grunnmuren-react": minor
3+
---
4+
5+
`LinkList` is now stable. Usage:
6+
7+
Basic list of links:
8+
9+
```tsx
10+
import { Link, LinkList, LinkListItem } from '@obosbbl/grunnmuren-react';
11+
12+
<LinkList>
13+
<LinkListItem>
14+
<Link href="/bolig">Bolig</Link>
15+
</LinkListItem>
16+
<LinkListItem>
17+
<Link href="/bank">Bank</Link>
18+
</LinkListItem>
19+
<LinkListItem>
20+
<Link href="/medlem">Medlem</Link>
21+
</LinkListItem>
22+
</LinkList>
23+
```
24+
25+
External links:
26+
27+
```tsx
28+
import { Link, LinkList, LinkListItem } from '@obosbbl/grunnmuren-react';
29+
30+
<LinkList>
31+
<LinkListItem>
32+
<Link href="https://minside.obosnett.no/login" rel="external">
33+
OBOS Nett - Min side
34+
</Link>
35+
</LinkListItem>
36+
<LinkListItem>
37+
<Link
38+
href="https://www.tryg.no"
39+
rel="external noopener noreferrer"
40+
target="_blank"
41+
>
42+
Les mer om trygg forsikring
43+
</Link>
44+
</LinkListItem>
45+
</LinkList>
46+
```
47+
48+
Downloadable files:
49+
50+
```tsx
51+
import { Link, LinkList, LinkListItem } from '@obosbbl/grunnmuren-react';
52+
53+
<LinkList>
54+
<LinkListItem>
55+
<Link download href="/vilkar.pdf">
56+
Medlemsvilkår
57+
</Link>
58+
</LinkListItem>
59+
<LinkListItem>
60+
<Link download href="/consent.pdf">
61+
Samtykke
62+
</Link>
63+
</LinkListItem>
64+
</LinkList>
65+
```
66+
67+
With headings:
68+
69+
```tsx
70+
import { Heading, Link, LinkList, LinkListContainer, LinkListItem } from '@obosbbl/grunnmuren-react';
71+
72+
<LinkListContainer>
73+
<Heading level={2}>
74+
<Link href="/om">OBOS</Link>
75+
</Heading>
76+
<LinkList>
77+
<LinkListItem>
78+
<Link href="/bolig">Bolig</Link>
79+
</LinkListItem>
80+
<LinkListItem>
81+
<Link href="/bank">Bank</Link>
82+
</LinkListItem>
83+
<LinkListItem>
84+
<Link href="/medlem">Medlem</Link>
85+
</LinkListItem>
86+
</LinkList>
87+
</LinkListContainer>
88+
```

packages/react/src/link-list/link-list.stories.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import type { Meta } from '@storybook/react-vite';
22
import { Heading } from '../content';
33
import { UNSAFE_Link as Link } from '../link';
4-
import {
5-
UNSAFE_LinkList as LinkList,
6-
UNSAFE_LinkListContainer as LinkListContainer,
7-
UNSAFE_LinkListItem as LinkListItem,
8-
} from './link-list';
4+
import { LinkList, LinkListContainer, LinkListItem } from './link-list';
95

106
const meta: Meta<typeof LinkList> = {
117
title: 'LinkList',

packages/react/src/link-list/link-list.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ const LinkListItem = (props: LinkListItemProps) => (
7979
);
8080

8181
export {
82-
LinkList as UNSAFE_LinkList,
83-
LinkListContainer as UNSAFE_LinkListContainer,
84-
LinkListItem as UNSAFE_LinkListItem,
85-
type LinkListContainerProps as UNSAFE_LinkListContainerProps,
86-
type LinkListItemProps as UNSAFE_LinkListItemProps,
87-
type LinkListProps as UNSAFE_LinkListProps,
82+
LinkList,
83+
LinkListContainer,
84+
LinkListItem,
85+
type LinkListContainerProps,
86+
type LinkListItemProps,
87+
type LinkListProps,
8888
};

0 commit comments

Comments
 (0)