docs: add clean markdown version of all documentation pages (#11308)
* added route to book * added to resources * added route to ui * added to user guide
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import * as React from "react"
|
||||
import { ExampleRegistry as ExampleRegistryType } from "types"
|
||||
|
||||
type ExampleType = {
|
||||
name: string
|
||||
component: React.LazyExoticComponent<() => React.JSX.Element>
|
||||
file: string
|
||||
}
|
||||
|
||||
export const ExampleRegistry: Record<string, ExampleType> = {
|
||||
export const ExampleRegistry: ExampleRegistryType = {
|
||||
"alert-demo": {
|
||||
name: "alert-demo",
|
||||
component: React.lazy(async () => import("@/examples/alert-demo")),
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { HookRegistryItem } from "@/types/hooks"
|
||||
import * as React from "react"
|
||||
|
||||
export type HookRegistryItem = {
|
||||
table: React.LazyExoticComponent<React.ComponentType>
|
||||
}
|
||||
|
||||
export const HookRegistry: Record<string, HookRegistryItem> = {
|
||||
usePrompt: {
|
||||
table: React.lazy(async () => import("../props/hooks/usePrompt")),
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { HookDataMap } from "../types/hooks"
|
||||
|
||||
export const useToggleState: HookDataMap = [
|
||||
{
|
||||
value: "state",
|
||||
type: {
|
||||
type: "object",
|
||||
name: "StateData",
|
||||
shape:
|
||||
"[\n state: boolean,\n open: () => void,\n close: () => void,\n toggle: () => void\n]",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
export const usePrompt: HookDataMap = [
|
||||
{
|
||||
value: "dialog",
|
||||
type: {
|
||||
type: "function",
|
||||
signature: `async (props: PromptProps): Promise<boolean>`,
|
||||
},
|
||||
description: "Async function used to display a new confirmation dialog.",
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user