'use client' import classNames from 'classnames' type IChildrenProps = { children: React.ReactNode id?: string tag?: any label?: any anchor: boolean } type IHeaderingProps = { url: string method: 'PUT' | 'DELETE' | 'GET' | 'POST' title: string name: string } export const Heading = function H2({ url, method, title, name, }: IHeaderingProps) { let style = ''; switch (method) { case 'PUT': style = 'ring-amber-300 bg-amber-400/10 text-amber-500 dark:ring-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400'; break; case 'DELETE': style = 'ring-rose-200 bg-rose-50 text-red-500 dark:ring-rose-500/20 dark:bg-rose-400/10 dark:text-rose-400'; break; case 'POST': style = 'ring-sky-300 bg-sky-400/10 text-sky-500 dark:ring-sky-400/30 dark:bg-sky-400/10 dark:text-sky-400'; break; default: style = 'ring-emerald-300 dark:ring-emerald-400/30 bg-emerald-400/10 text-emerald-500 dark:text-emerald-400'; break; } return ( <>
{method} {/* */} {url}

{title}

) } export function Row({ children }: IChildrenProps) { return (
{children}
) } type IColProps = IChildrenProps & { sticky: boolean } export function Col({ children, sticky = false }: IColProps) { return (
:first-child]:mt-0 [&>:last-child]:mb-0', sticky && 'xl:sticky xl:top-24', )} > {children}
) } export function Properties({ children }: IChildrenProps) { return (
) } type IProperty = IChildrenProps & { name: string type: string } export function Property({ name, type, children }: IProperty) { return (
  • Name
    {name}
    Type
    {type}
    Description
    {children}
  • ) } type ISubProperty = IChildrenProps & { name: string type: string } export function SubProperty({ name, type, children }: ISubProperty) { return (
  • Name
    {name}
    Type
    {type}
    Description
    {children}
  • ) }