-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
useMessages
for convenience and restructure docs to be Ap…
…p Router-first (#345)
- Loading branch information
Showing
63 changed files
with
3,635 additions
and
1,171 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import clsx from 'clsx'; | ||
import {ReactNode} from 'react'; | ||
|
||
type Props = { | ||
children: ReactNode; | ||
className?: string; | ||
color?: 'green' | 'yellow'; | ||
}; | ||
|
||
export default function Chip({children, className, color = 'green'}: Props) { | ||
return ( | ||
<span | ||
className={clsx( | ||
className, | ||
'inline-block rounded-md px-[6px] py-[2px] text-xs font-semibold uppercase tracking-wider', | ||
{ | ||
green: | ||
'bg-green-100 text-green-800 dark:bg-green-800/50 dark:text-green-100', | ||
yellow: | ||
'bg-yellow-100 text-orange-800 dark:bg-yellow-800/50 dark:text-yellow-100' | ||
}[color] | ||
)} | ||
> | ||
{children} | ||
</span> | ||
); | ||
} |
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
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,31 @@ | ||
import {Tabs} from 'nextra-theme-docs'; | ||
import {ReactNode} from 'react'; | ||
import Chip from './Chip'; | ||
|
||
type Props = { | ||
children: ReactNode; | ||
defaultLabel?: ReactNode; | ||
rscLabel?: ReactNode; | ||
}; | ||
|
||
export default function VersionTabs({ | ||
children, | ||
defaultLabel = 'Default', | ||
rscLabel = 'Server Components' | ||
}: Props) { | ||
return ( | ||
<Tabs | ||
items={[ | ||
defaultLabel, | ||
<span key="2" className="inline-flex items-center"> | ||
<span>{rscLabel}</span> | ||
<Chip className="ml-2" color="yellow"> | ||
Beta | ||
</Chip> | ||
</span> | ||
]} | ||
> | ||
{children} | ||
</Tabs> | ||
); | ||
} |
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
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
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,7 +1,11 @@ | ||
{ | ||
"getting-started": "Getting started", | ||
"usage": "Usage guide", | ||
"environments": "Environments", | ||
"configuration": "Global configuration", | ||
"routing": "Routing", | ||
"typescript": "TypeScript", | ||
"production-checklist": "Production checklist", | ||
"faq": "FAQ", | ||
"next-13": "Next.js 13", | ||
"localization-management": "Localization management with Crowdin" | ||
} |
Oops, something went wrong.
0dedbfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-intl-example-next-13 – ./examples/example-next-13
next-intl-example-next-13.vercel.app
next-intl-example-next-13-next-intl.vercel.app
next-intl-example-next-13-git-main-next-intl.vercel.app
0dedbfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-intl-docs – ./docs
next-intl-docs-next-intl.vercel.app
next-intl-docs-git-main-next-intl.vercel.app
next-intl-docs.vercel.app