File tree Expand file tree Collapse file tree 11 files changed +72
-43
lines changed Expand file tree Collapse file tree 11 files changed +72
-43
lines changed Original file line number Diff line number Diff line change
1
+ @reference "../../../styles/index.css" ;
2
+
3
+ .icon {
4
+ @apply ml-1
5
+ inline
6
+ w-3
7
+ fill-neutral-600
8
+ dark:fill-white;
9
+ }
10
+
11
+ .button {
12
+ @apply text-green-600
13
+ hover:text-green-900
14
+ dark:text-green-400
15
+ dark:hover:text-green-200;
16
+ }
Original file line number Diff line number Diff line change
1
+ import { ArrowUpRightIcon } from '@heroicons/react/24/solid' ;
2
+ import classNames from 'classnames' ;
3
+ import type {
4
+ ButtonHTMLAttributes ,
5
+ ComponentProps ,
6
+ FC ,
7
+ PropsWithChildren ,
8
+ } from 'react' ;
9
+
10
+ import Link from '#site/components/Link' ;
11
+
12
+ import styles from './index.module.css' ;
13
+
14
+ type LinkWithArrowProps =
15
+ | ComponentProps < typeof Link >
16
+ | ButtonHTMLAttributes < HTMLButtonElement > ;
17
+
18
+ const LinkWithArrow : FC < PropsWithChildren < LinkWithArrowProps > > = ( {
19
+ children,
20
+ className,
21
+ ...props
22
+ } ) => {
23
+ const content = (
24
+ < span >
25
+ { children }
26
+ < ArrowUpRightIcon className = { styles . icon } />
27
+ </ span >
28
+ ) ;
29
+
30
+ if ( 'href' in props ) {
31
+ return (
32
+ < Link { ...props } className = { className } >
33
+ { content }
34
+ </ Link >
35
+ ) ;
36
+ }
37
+
38
+ return (
39
+ < button
40
+ className = { classNames ( className , styles . button ) }
41
+ { ...( props as ButtonHTMLAttributes < HTMLButtonElement > ) }
42
+ >
43
+ { content }
44
+ </ button >
45
+ ) ;
46
+ } ;
47
+
48
+ export default LinkWithArrow ;
Original file line number Diff line number Diff line change 2
2
3
3
import type { FC , PropsWithChildren } from 'react' ;
4
4
5
- import LinkWithArrow from '#site/components/LinkWithArrow' ;
5
+ import LinkWithArrow from '#site/components/Common/ LinkWithArrow' ;
6
6
import { useClientContext } from '#site/hooks' ;
7
7
import type { DownloadKind , NodeRelease } from '#site/types' ;
8
8
import { getNodeDownloadUrl } from '#site/util/url' ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { useTranslations } from 'next-intl';
4
4
import type { FC } from 'react' ;
5
5
import { use } from 'react' ;
6
6
7
- import LinkWithArrow from '#site/components/LinkWithArrow' ;
7
+ import LinkWithArrow from '#site/components/Common/ LinkWithArrow' ;
8
8
import { ReleaseModalContext } from '#site/providers/releaseModalProvider' ;
9
9
import type { NodeRelease } from '#site/types' ;
10
10
@@ -19,8 +19,8 @@ const DetailsButton: FC<DetailsButtonProps> = ({ versionData }) => {
19
19
20
20
return (
21
21
< LinkWithArrow
22
- className = "cursor-pointer"
23
22
onClick = { ( ) => openModal ( versionData ) }
23
+ aria-label = { t ( 'details' ) }
24
24
>
25
25
{ t ( 'details' ) }
26
26
</ LinkWithArrow >
Original file line number Diff line number Diff line change 3
3
import type { FC , PropsWithChildren } from 'react' ;
4
4
import { useContext } from 'react' ;
5
5
6
- import Link from '#site/components/Link' ;
7
- import LinkWithArrow from '#site/components/LinkWithArrow' ;
6
+ import LinkWithArrow from '#site/components/Common/LinkWithArrow' ;
8
7
import { BASE_CHANGELOG_URL } from '#site/next.constants.mjs' ;
9
8
import { ReleaseContext } from '#site/providers/releaseProvider' ;
10
9
11
10
const ChangelogLink : FC < PropsWithChildren > = ( { children } ) => {
12
11
const { release } = useContext ( ReleaseContext ) ;
13
12
14
13
return (
15
- < LinkWithArrow asChild >
16
- < Link href = { ` ${ BASE_CHANGELOG_URL } ${ release . version } ` } > { children } </ Link >
14
+ < LinkWithArrow href = { ` ${ BASE_CHANGELOG_URL } ${ release . version } ` } >
15
+ { children }
17
16
</ LinkWithArrow >
18
17
) ;
19
18
} ;
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import type { FC } from 'react';
8
8
import { useContext , useMemo } from 'react' ;
9
9
10
10
import CodeBox from '#site/components/Common/CodeBox' ;
11
+ import LinkWithArrow from '#site/components/Common/LinkWithArrow' ;
11
12
import Link from '#site/components/Link' ;
12
- import LinkWithArrow from '#site/components/LinkWithArrow' ;
13
13
import { createSval } from '#site/next.jsx.compiler.mjs' ;
14
14
import {
15
15
ReleaseContext ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ const nextConfig = {
84
84
'@radix-ui/react-dropdown-menu' ,
85
85
'@radix-ui/react-label' ,
86
86
'@radix-ui/react-select' ,
87
- '@radix-ui/react-slot' ,
88
87
'@radix-ui/react-tabs' ,
89
88
'@radix-ui/react-toast' ,
90
89
'@radix-ui/react-tooltip' ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Blockquote from '@node-core/ui-components/Common/Blockquote';
4
4
import MDXCodeTabs from '@node-core/ui-components/MDX/CodeTabs' ;
5
5
6
6
import Button from './components/Common/Button' ;
7
+ import LinkWithArrow from './components/Common/LinkWithArrow' ;
7
8
import DownloadButton from './components/Downloads/DownloadButton' ;
8
9
import DownloadLink from './components/Downloads/DownloadLink' ;
9
10
import BlogPostLink from './components/Downloads/Release/BlogPostLink' ;
@@ -17,7 +18,6 @@ import ReleasePrebuiltDownloadButtons from './components/Downloads/Release/Prebu
17
18
import ReleaseCodeBox from './components/Downloads/Release/ReleaseCodeBox' ;
18
19
import ReleaseVersionDropdown from './components/Downloads/Release/VersionDropdown' ;
19
20
import Link from './components/Link' ;
20
- import LinkWithArrow from './components/LinkWithArrow' ;
21
21
import MDXCodeBox from './components/MDX/CodeBox' ;
22
22
import MDXImage from './components/MDX/Image' ;
23
23
import { ReleaseProvider } from './providers/releaseProvider' ;
Original file line number Diff line number Diff line change 42
42
"@opentelemetry/sdk-logs" : " ~0.202.0" ,
43
43
"@orama/react-components" : " ^0.8.1" ,
44
44
"@oramacloud/client" : " ^2.1.4" ,
45
- "@radix-ui/react-slot" : " ^1.2.3" ,
46
45
"@radix-ui/react-tabs" : " ^1.1.12" ,
47
46
"@radix-ui/react-tooltip" : " ^1.2.7" ,
48
47
"@tailwindcss/postcss" : " ~4.1.11" ,
You can’t perform that action at this time.
0 commit comments