fix: correct links in docs (#2708)

This commit is contained in:
Ryo Matsukawa 2024-04-14 23:28:21 +09:00 committed by GitHub
parent eb11a7731a
commit feab3e6c1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 6 deletions

View File

@ -8,6 +8,8 @@ import {trackEvent} from "@/utils/va";
export interface ComponentLinksProps {
component: string;
npm?: string;
source?: string;
styles?: string;
storybook?: string;
rscCompatible?: boolean;
@ -60,6 +62,8 @@ const ButtonLink = ({
export const ComponentLinks = ({
component,
npm,
source,
storybook,
styles,
rscCompatible,
@ -80,10 +84,10 @@ export const ComponentLinks = ({
Storybook
</ButtonLink>
<ButtonLink
href={`https://www.npmjs.com/package/@nextui-org/${component}`}
href={`https://www.npmjs.com/package/@nextui-org/${npm || component}`}
startContent={<NpmIcon className="text-2xl text-[#E53E3E]" />}
>
{`@nextui-org/${component}`}
{`@nextui-org/${npm || component}`}
</ButtonLink>
{reactAriaHook && (
<ButtonLink
@ -113,7 +117,10 @@ export const ComponentLinks = ({
</ButtonLink>
)}
<ButtonLink href={`${COMPONENT_PATH}/${component}`} startContent={<GithubIcon size={20} />}>
<ButtonLink
href={`${COMPONENT_PATH}/${source || component}`}
startContent={<GithubIcon size={20} />}
>
Source
</ButtonLink>
<ButtonLink

View File

@ -205,7 +205,7 @@ In case you need to customize the input even further, you can use the `useInput`
| baseRef | `RefObject<HTMLDivElement>` | The ref to the base element. | - |
| validationState | `valid` \| `invalid` | Whether the input should display its "valid" or "invalid" visual styling. (**Deprecated**) use **isInvalid** instead. | - |
| disableAnimation | `boolean` | Whether the input should be animated. | `false` |
| classNames | `Record<"base" "label" "inputWrapper" "innerWrapper" "mainWrapper" "input" "clearButton" "helperWrapper" "description" "errorMessage", string>` | Allows to set custom class names for the checkbox slots. | - |
| classNames | `Record<"base" "label" "inputWrapper" "innerWrapper" "mainWrapper" "input" "clearButton" "helperWrapper" "description" "errorMessage", string>` | Allows to set custom class names for the Input slots. | - |
### Input Events

View File

@ -9,7 +9,7 @@ import {radioGroupContent} from "@/content/components/radio-group";
Radio Group allow users to select a single option from a list of mutually exclusive options.
<ComponentLinks component="radiogroup" reactAriaHook="useRadioGroup" />
<ComponentLinks component="radiogroup" reactAriaHook="useRadioGroup" npm="radio" styles="radio" source="radio" />
---

View File

@ -9,7 +9,7 @@ import {scrollShadowContent} from "@/content/components/scroll-shadow";
Applies top and bottom shadows when content overflows on scroll.
<ComponentLinks component="scroll-shadow" />
<ComponentLinks component="scroll-shadow" storybook="scrollshadow" />
---