-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
344da5b
commit b7a1cae
Showing
165 changed files
with
2,320 additions
and
1,467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import AbstractBadge from '@node-core/ui-components/Common/Badge'; | ||
import type { BadgeProps } from '@node-core/ui-components/Common/Badge'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
const Badge: FC<BadgeProps> = props => { | ||
return <AbstractBadge linkComponent={Link} {...props} />; | ||
}; | ||
|
||
export default Badge; |
13 changes: 6 additions & 7 deletions
13
apps/site/components/Common/Banner/index.tsx → ...site/components/Common/BannerWithLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
import { ArrowUpRightIcon } from '@heroicons/react/24/outline'; | ||
import Banner from '@node-core/ui-components/Common/Banner'; | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
type BannerProps = { | ||
link?: string; | ||
type?: 'default' | 'warning' | 'error'; | ||
}; | ||
|
||
const Banner: FC<PropsWithChildren<BannerProps>> = ({ | ||
type = 'default', | ||
const BannerWithLink: FC<PropsWithChildren<BannerProps>> = ({ | ||
type, | ||
link, | ||
children, | ||
}) => ( | ||
<div className={`${styles.banner} ${styles[type] || styles.default}`}> | ||
<Banner type={type}> | ||
{link ? <Link href={link}>{children}</Link> : children} | ||
{link && <ArrowUpRightIcon />} | ||
</div> | ||
</Banner> | ||
); | ||
|
||
export default Banner; | ||
export default BannerWithLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import AbstractBreadCrumbs from '@node-core/ui-components/Common/Breadcrumbs'; | ||
import type { BreadcrumbsProps } from '@node-core/ui-components/Common/Breadcrumbs'; | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
const Breadcrumbs: FC<BreadcrumbsProps> = props => { | ||
return ( | ||
<AbstractBreadCrumbs | ||
useTranslations={useTranslations} | ||
linkComponent={Link} | ||
{...props} | ||
/> | ||
); | ||
}; | ||
|
||
export default Breadcrumbs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import AbstractButton from '@node-core/ui-components/Common/Button'; | ||
import type { FC, AnchorHTMLAttributes } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
type ButtonProps = AnchorHTMLAttributes<HTMLAnchorElement> & { | ||
kind?: 'neutral' | 'primary' | 'secondary' | 'special'; | ||
// We have an extra `disabled` prop as we simulate a button | ||
disabled?: boolean; | ||
}; | ||
|
||
const Button: FC<ButtonProps> = props => ( | ||
<AbstractButton linkComponent={Link} {...props} /> | ||
); | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import AbstractCodeBox from '@node-core/ui-components/Common/CodeBox'; | ||
import type { CodeBoxProps } from '@node-core/ui-components/Common/CodeBox'; | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
import { useCopyToClipboard, useNotification } from '@/hooks'; | ||
|
||
const CodeBox: FC<PropsWithChildren<CodeBoxProps>> = ({ | ||
children, | ||
...props | ||
}) => { | ||
return ( | ||
<AbstractCodeBox | ||
useTranslations={useTranslations} | ||
useCopyToClipboard={useCopyToClipboard} | ||
useNotification={useNotification} | ||
linkComponent={Link} | ||
{...props} | ||
> | ||
{children} | ||
</AbstractCodeBox> | ||
); | ||
}; | ||
|
||
export default CodeBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import AbstractCrossLink from '@node-core/ui-components/Common/CrossLink'; | ||
import type { CrossLinkProps } from '@node-core/ui-components/Common/CrossLink'; | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
const CrossLink: FC<CrossLinkProps> = props => { | ||
return ( | ||
<AbstractCrossLink | ||
linkComponent={Link} | ||
useTranslations={useTranslations} | ||
{...props} | ||
/> | ||
); | ||
}; | ||
|
||
export default CrossLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import AbstractLanguageDropdown from '@node-core/ui-components/Common/LanguageDropDown'; | ||
import type { LanguageDropDownProps } from '@node-core/ui-components/Common/LanguageDropDown'; | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
const LanguageDropDown: FC<LanguageDropDownProps> = props => ( | ||
<AbstractLanguageDropdown useTranslations={useTranslations} {...props} /> | ||
); | ||
|
||
export default LanguageDropDown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import AbstractPagination from '@node-core/ui-components/Common/Pagination'; | ||
import type { PaginationProps } from '@node-core/ui-components/Common/Pagination'; | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '@/components/Link'; | ||
|
||
const Pagination: FC<PaginationProps> = props => { | ||
return ( | ||
<AbstractPagination | ||
linkComponent={Link} | ||
useTranslations={useTranslations} | ||
{...props} | ||
/> | ||
); | ||
}; | ||
|
||
export default Pagination; |
53 changes: 0 additions & 53 deletions
53
apps/site/components/Common/Pagination/PaginationListItem/__tests__/index.test.mjs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.