import Translate from "@docusaurus/Translate" import { AndLabel } from "@theme/JSONSchemaViewer/labels" import type { JSX } from "react" import type { JSONSchema } from "@theme/JSONSchemaViewer/types" type Props = { schema: Exclude } // minProperties function MinProperties({ value }: { value: number }): JSX.Element { return ( {">= {count} propertie(s)"} ) } // maxProperties function MaxProperties({ value }: { value: number }): JSX.Element { return ( {"<= {count} propertie(s)"} ) } // minProperties / maxProperties export default function ObjectProperties(props: Props): JSX.Element { const { schema } = props let minAndMax = schema.minProperties !== undefined && schema.maxProperties !== undefined const propertiesLabel = ( {"Length :"} ) return (
{propertiesLabel}   {schema.minProperties !== undefined && ( )} {minAndMax && } {schema.maxProperties !== undefined && ( )}
) }