mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 02:49:16 +01:00
docs: 📝 Add ContentFormat docs
This commit is contained in:
parent
eb5a58621a
commit
9b75c25fa0
4 changed files with 187 additions and 18 deletions
|
|
@ -92,17 +92,25 @@ export function Properties({ children }: { children: ReactNode }) {
|
|||
);
|
||||
}
|
||||
|
||||
const numberTypeTooltips = {
|
||||
f64: "64-bit floating-point number",
|
||||
i64: "64-bit signed integer",
|
||||
u64: "64-bit unsigned integer",
|
||||
};
|
||||
|
||||
export function Property({
|
||||
name,
|
||||
children,
|
||||
type,
|
||||
typeLink,
|
||||
numberType,
|
||||
required,
|
||||
}: {
|
||||
name: string;
|
||||
children: ReactNode;
|
||||
type?: string;
|
||||
typeLink?: string;
|
||||
numberType?: "f64" | "i64" | "u64";
|
||||
required?: boolean;
|
||||
}) {
|
||||
return (
|
||||
|
|
@ -120,6 +128,17 @@ export function Property({
|
|||
</dd>
|
||||
</>
|
||||
)}
|
||||
{numberType && (
|
||||
<>
|
||||
<dt className="sr-only">Type</dt>
|
||||
<dd
|
||||
className="inline-flex items-center rounded-md bg-blue-50 px-2 py-0 text-xs font-medium text-blue-700 ring-1 ring-inset ring-blue-500/10 dark:bg-blue-500/10 dark:text-blue-100 dark:ring-blue-200/20 hover:cursor-pointer"
|
||||
title={numberTypeTooltips[numberType]}
|
||||
>
|
||||
{numberType}
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
{type && (
|
||||
<>
|
||||
<dt className="sr-only">Type</dt>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue