| | |
| | | |
| | | type IHeaderingProps = { |
| | | url: string |
| | | method: 'PUT' | 'DELETE' | 'GET' | 'POST' | 'PATCH' |
| | | method: 'PUT' | 'DELETE' | 'GET' | 'POST' |
| | | title: string |
| | | name: string |
| | | } |
| | |
| | | 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 |
| | | case 'PATCH': |
| | | style = 'ring-violet-300 bg-violet-400/10 text-violet-500 dark:ring-violet-400/30 dark:bg-violet-400/10 dark:text-violet-400' |
| | | break |
| | | default: |
| | | style = 'ring-emerald-300 dark:ring-emerald-400/30 bg-emerald-400/10 text-emerald-500 dark:text-emerald-400' |
| | | break |
| | |
| | | <> |
| | | <span id={name?.replace(/^#/, '')} className='relative -top-28' /> |
| | | <div className="flex items-center gap-x-3" > |
| | | <span className={`rounded-lg px-1.5 font-mono text-[0.625rem] font-semibold leading-6 ring-1 ring-inset ${style}`}>{method}</span> |
| | | <span className={`font-mono text-[0.625rem] font-semibold leading-6 rounded-lg px-1.5 ring-1 ring-inset ${style}`}>{method}</span> |
| | | {/* <span className="h-0.5 w-0.5 rounded-full bg-zinc-300 dark:bg-zinc-600"></span> */} |
| | | <span className="font-mono text-xs text-zinc-400">{url}</span> |
| | | </div> |
| | | <h2 className='mt-2 scroll-mt-32'> |
| | | <a href={name} className='group text-inherit no-underline hover:text-inherit'>{title}</a> |
| | | <a href={name} className='no-underline group text-inherit hover:text-inherit'>{title}</a> |
| | | </h2> |
| | | </> |
| | | |
| | |
| | | |
| | | export function Row({ children }: IChildrenProps) { |
| | | return ( |
| | | <div className="grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:!max-w-none xl:grid-cols-2"> |
| | | <div className="grid items-start grid-cols-1 gap-x-16 gap-y-10 xl:max-w-none xl:grid-cols-2"> |
| | | {children} |
| | | </div> |
| | | ) |
| | |
| | | } |
| | | export function Property({ name, type, children }: IProperty) { |
| | | return ( |
| | | <li className="m-0 px-0 py-4 first:pt-0 last:pb-0"> |
| | | <dl className="m-0 flex flex-wrap items-center gap-x-3 gap-y-2"> |
| | | <li className="px-0 py-4 m-0 first:pt-0 last:pb-0"> |
| | | <dl className="flex flex-wrap items-center m-0 gap-x-3 gap-y-2"> |
| | | <dt className="sr-only">Name</dt> |
| | | <dd> |
| | | <code>{name}</code> |
| | |
| | | } |
| | | export function SubProperty({ name, type, children }: ISubProperty) { |
| | | return ( |
| | | <li className="m-0 px-0 py-1 last:pb-0"> |
| | | <dl className="m-0 flex flex-wrap items-center gap-x-3"> |
| | | <li className="px-0 py-1 m-0 last:pb-0"> |
| | | <dl className="flex flex-wrap items-center m-0 gap-x-3"> |
| | | <dt className="sr-only">Name</dt> |
| | | <dd> |
| | | <code>{name}</code> |
| | |
| | | |
| | | export function PropertyInstruction({ children }: PropsWithChildren<{}>) { |
| | | return ( |
| | | <li className="m-0 px-0 py-4 italic first:pt-0">{children}</li> |
| | | <li className="m-0 px-0 py-4 first:pt-0 italic">{children}</li> |
| | | ) |
| | | } |