-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(website): update 'configurations.mdx' and 'configurations.tsx'
- Loading branch information
Showing
14 changed files
with
203 additions
and
85 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
/* eslint-disable perfectionist/sort-objects */ | ||
import dedent from "dedent"; | ||
import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock"; | ||
import { TypeTable } from "fumadocs-ui/components/type-table"; | ||
import { Link } from "next-view-transitions"; | ||
|
||
export function ConfigurationsTypeTable() { | ||
return ( | ||
<TypeTable | ||
type={{ | ||
version: { | ||
type: "string", | ||
description: <Link href="#version">React version to perform the analysis.</Link>, | ||
default: "detect", | ||
}, | ||
importSource: { | ||
type: "string", | ||
description: <Link href="#importsource">The source where React is imported from.</Link>, | ||
default: "react", | ||
}, | ||
polymorphicPropName: { | ||
type: "string", | ||
description: ( | ||
<Link href="#polymorphicpropname">The prop your code uses to create polymorphic components.</Link> | ||
), | ||
default: "as", | ||
}, | ||
additionalComponents: { | ||
type: "CustomComponent[]", | ||
description: <Link href="#additionalcomponents">An array of components and its attributes mapping.</Link>, | ||
default: "[]", | ||
typeDescription: ( | ||
<DynamicCodeBlock | ||
code={dedent` | ||
type CustomComponent = { | ||
name: string; | ||
as?: string; | ||
attributes?: { | ||
name: string; | ||
as?: string; | ||
defaultValue?: string; | ||
}[] | ||
} | ||
`} | ||
lang="ts" | ||
/> | ||
), | ||
}, | ||
additionalHooks: { | ||
type: "Record<ReactBuiltInHookName, string[]>", | ||
description: <Link href="#additionalhooks">An object of aliases for React built-in Hooks.</Link>, | ||
default: "{}", | ||
typeDescription: ( | ||
<DynamicCodeBlock | ||
code={dedent` | ||
type ReactBuiltInHookName = | ||
| "use" | ||
| "useActionState" | ||
| "useCallback" | ||
| "useContext" | ||
| "useDebugValue" | ||
| "useDeferredValue" | ||
| "useEffect" | ||
| "useFormStatus" | ||
| "useId" | ||
| "useImperativeHandle" | ||
| "useInsertionEffect" | ||
| "useLayoutEffect" | ||
| "useMemo" | ||
| "useOptimistic" | ||
| "useReducer" | ||
| "useRef" | ||
| "useState" | ||
| "useSyncExternalStore" | ||
| "useTransition"; | ||
`} | ||
lang="ts" | ||
/> | ||
), | ||
}, | ||
}} | ||
/> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.