Skip to content

Commit 0b6f5b8

Browse files
committed
Update example with buttonProps instead of link props
1 parent 6324ebd commit 0b6f5b8

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

test/integration/next-appdir/ui/ClientFooterItem.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ export function ClientFooterItem() {
66
<FooterBottomItem
77
bottomItem={{
88
iconId: "fr-icon-arrow-down-line",
9-
linkProps: {
10-
href: `https://example.com`,
9+
buttonProps: {
10+
onClick: ()=> {
11+
12+
alert("Click on client item");
13+
14+
}
1115
},
1216
text: "A client side bottom item",
1317

test/integration/next-appdir/ui/ClientHeaderQuickAccessItem.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
33
import { HeaderQuickAccessItem } from "@codegouvfr/react-dsfr/Header";
44

55
export function ClientHeaderQuickAccessItem() {
6+
7+
//NOTE: You can use hooks here
8+
69
return (
710
<HeaderQuickAccessItem
811
quickAccessItem={{
9-
iconId: "fr-icon-article-fill",
10-
linkProps: {
11-
href: `/some-page`,
12+
iconId: "ri-layout-4-line",
13+
buttonProps: {
14+
onClick: ()=> {
15+
16+
alert("Click on client item");
17+
18+
}
1219
},
1320
text: "A client side item",
1421

0 commit comments

Comments
 (0)