File tree Expand file tree Collapse file tree 11 files changed +69
-63
lines changed
Expand file tree Collapse file tree 11 files changed +69
-63
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 22
33import type { FC , PropsWithChildren } from 'react' ;
44
5- import LinkWithArrow from '#site/components/LinkWithArrow' ;
5+ import LinkWithArrow from '#site/components/Common/ LinkWithArrow' ;
66import { useClientContext } from '#site/hooks' ;
77import type { DownloadKind , NodeRelease } from '#site/types' ;
88import { getNodeDownloadUrl } from '#site/util/url' ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { useTranslations } from 'next-intl';
44import type { FC } from 'react' ;
55import { use } from 'react' ;
66
7- import LinkWithArrow from '#site/components/LinkWithArrow' ;
7+ import LinkWithArrow from '#site/components/Common/ LinkWithArrow' ;
88import { ReleaseModalContext } from '#site/providers/releaseModalProvider' ;
99import type { NodeRelease } from '#site/types' ;
1010
@@ -21,7 +21,6 @@ const DetailsButton: FC<DetailsButtonProps> = ({ versionData }) => {
2121 < LinkWithArrow
2222 onClick = { ( ) => openModal ( versionData ) }
2323 aria-label = { t ( 'details' ) }
24- className = "cursor-pointer"
2524 >
2625 { t ( 'details' ) }
2726 </ LinkWithArrow >
Original file line number Diff line number Diff line change 33import type { FC , PropsWithChildren } from 'react' ;
44import { useContext } from 'react' ;
55
6- import LinkWithArrow from '#site/components/LinkWithArrow' ;
6+ import LinkWithArrow from '#site/components/Common/ LinkWithArrow' ;
77import { BASE_CHANGELOG_URL } from '#site/next.constants.mjs' ;
88import { ReleaseContext } from '#site/providers/releaseProvider' ;
99
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import type { FC } from 'react';
88import { useContext , useMemo } from 'react' ;
99
1010import CodeBox from '#site/components/Common/CodeBox' ;
11+ import LinkWithArrow from '#site/components/Common/LinkWithArrow' ;
1112import Link from '#site/components/Link' ;
12- import LinkWithArrow from '#site/components/LinkWithArrow' ;
1313import { createSval } from '#site/next.jsx.compiler.mjs' ;
1414import {
1515 ReleaseContext ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ const nextConfig = {
8484 '@radix-ui/react-dropdown-menu' ,
8585 '@radix-ui/react-label' ,
8686 '@radix-ui/react-select' ,
87- '@radix-ui/react-slot' ,
8887 '@radix-ui/react-tabs' ,
8988 '@radix-ui/react-toast' ,
9089 '@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';
44import MDXCodeTabs from '@node-core/ui-components/MDX/CodeTabs' ;
55
66import Button from './components/Common/Button' ;
7+ import LinkWithArrow from './components/Common/LinkWithArrow' ;
78import DownloadButton from './components/Downloads/DownloadButton' ;
89import DownloadLink from './components/Downloads/DownloadLink' ;
910import BlogPostLink from './components/Downloads/Release/BlogPostLink' ;
@@ -17,7 +18,6 @@ import ReleasePrebuiltDownloadButtons from './components/Downloads/Release/Prebu
1718import ReleaseCodeBox from './components/Downloads/Release/ReleaseCodeBox' ;
1819import ReleaseVersionDropdown from './components/Downloads/Release/VersionDropdown' ;
1920import Link from './components/Link' ;
20- import LinkWithArrow from './components/LinkWithArrow' ;
2121import MDXCodeBox from './components/MDX/CodeBox' ;
2222import MDXImage from './components/MDX/Image' ;
2323import { ReleaseProvider } from './providers/releaseProvider' ;
Original file line number Diff line number Diff line change 4242 "@opentelemetry/sdk-logs" : " ~0.202.0" ,
4343 "@orama/react-components" : " ^0.8.1" ,
4444 "@oramacloud/client" : " ^2.1.4" ,
45- "@radix-ui/react-slot" : " ^1.2.3" ,
4645 "@radix-ui/react-tabs" : " ^1.1.12" ,
4746 "@radix-ui/react-tooltip" : " ^1.2.7" ,
4847 "@tailwindcss/postcss" : " ~4.1.11" ,
You can’t perform that action at this time.
0 commit comments