blob: 46664c4c95438dc3b4a035683f6369b619d94952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import React from "react";
interface ClassPropertyRefProps {
name: string;
details: string;
required: boolean;
}
export default function ClassPropertyRef(props: ClassPropertyRefProps) {
const details = JSON.parse(props.details);
return (
<>
<div>
<h4 style={{ display: "inline-block", marginRight: "10px" }}>
{props.name}
</h4>
<span style={{ color: "red", fontSize: "11px", marginRight: "4px" }}>
{props.required && "REQUIRED"}
</span>
<span>{details.type && `(${details.type})`}</span>
</div>
<p>{details.description}</p>
</>
);
}
|