import type { LoaderFunction } from "remix" import { useLoaderData } from "remix" import { getApiData } from "~/modules/api/api-data.server" import { renderMarkdown } from "~/modules/markdown/render-markdown.server" import { docsProseClass } from "~/modules/ui/components" type LoaderData = { title: string description?: { __html: string } [key: string]: unknown } export const loader: LoaderFunction = async ({ params }) => { const apiData = getApiData() const entityName = params.name! const info = apiData.children?.find((child) => child.name === entityName) const description = [ info?.comment?.shortText, info?.comment?.text, info?.signatures?.[0]?.comment?.shortText, info?.signatures?.[0]?.comment?.text, ] .filter(Boolean) .join("\n\n") const data: LoaderData = { title: entityName, description: description ? await renderMarkdown(description) : undefined, sig: await renderMarkdown(` \`\`\`tsx function ActionRow(props: ActionRowProps): ReactElement \`\`\` `), } return data } export default function ApiDetailPage() { const data = useLoaderData() return ( <>

{data.title}

Component

  • children?: ReactNode

    This should be a list of {` components.

    • disabled?: boolean

      When true, the select will be slightly faded, and cannot be interacted with.

  • minValues?: number

    With multiple, the minimum number of values that can be selected. When multiple is false or not defined, this is always 1.

    This only limits the number of values that can be received by the user. This does not limit the number of values that can be displayed by you.

) }