import React from "react"; interface ClassPropertyRefProps { name: string; details: string; required: boolean; default: string; } const PYTHON_TYPES = { string: "str", integer: "int", }; export default function ClassPropertyRef(props: ClassPropertyRefProps) { const details = JSON.parse(props.details); return ( <>

{props.name}

{props.required && ( REQUIRED )} {details.type && `(${PYTHON_TYPES[details.type] || details.type})`} {props.default && ( {" "} = {details.type === "string" && '"'} {props.default} {details.type === "string" && '"'} )}

{details.description}

); }