File tree Expand file tree Collapse file tree 2 files changed +60
-3
lines changed Expand file tree Collapse file tree 2 files changed +60
-3
lines changed Original file line number Diff line number Diff line change
1
+ import * as React from "react"
2
+ import { VStack } from "@chakra-ui/react"
3
+ import { Meta , StoryObj } from "@storybook/react"
4
+
5
+ import DocLink from "."
6
+
7
+ const meta = {
8
+ title : "Molecules / Navigation / DocLink" ,
9
+ component : DocLink ,
10
+ tags : [ "autodocs" ] ,
11
+ } satisfies Meta < typeof DocLink >
12
+
13
+ export default meta
14
+
15
+ type Story = StoryObj < typeof meta >
16
+
17
+ export const Default : Story = {
18
+ args : {
19
+ href : "/history/" ,
20
+ children : "History of Ethereum" ,
21
+ } ,
22
+ render : ( args ) => (
23
+ < VStack spacing = { 4 } align = "stretch" >
24
+ < DocLink { ...args } />
25
+ </ VStack >
26
+ ) ,
27
+ }
28
+
29
+ export const ExternalLink : Story = {
30
+ args : {
31
+ href : "https://ethereum.org" ,
32
+ children : "Ethereum Website" ,
33
+ isExternal : true ,
34
+ } ,
35
+ render : ( args ) => (
36
+ < VStack spacing = { 4 } align = "stretch" >
37
+ < DocLink { ...args } />
38
+ </ VStack >
39
+ ) ,
40
+ }
41
+
42
+ export const MultipleLinks : Story = {
43
+ args : {
44
+ href : "#" ,
45
+ } ,
46
+ render : ( ) => (
47
+ < VStack spacing = { 4 } align = "stretch" >
48
+ < DocLink href = "/history/" > History of Ethereum</ DocLink >
49
+ < DocLink href = "https://ethereum.org" isExternal >
50
+ Ethereum Website
51
+ </ DocLink >
52
+ < DocLink href = "/developers/docs/intro-to-ethereum/" >
53
+ Introduction to Ethereum
54
+ </ DocLink >
55
+ </ VStack >
56
+ ) ,
57
+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import { AiOutlineArrowRight } from "react-icons/ai"
2
2
3
3
import { cn } from "@/lib/utils/cn"
4
4
5
- import { Center , Flex , Stack } from "./ui/flex "
6
- import { LinkBox , LinkOverlay } from "./ui/link-box "
7
- import Emoji from "./Emoji "
5
+ import Emoji from "../Emoji "
6
+ import { Center , Flex , Stack } from ".. /ui/flex "
7
+ import { LinkBox , LinkOverlay } from "../ui/link-box "
8
8
9
9
import { useRtlFlip } from "@/hooks/useRtlFlip"
10
10
You can’t perform that action at this time.
0 commit comments