From 331b2adcb6f8d962e4ed19292fd2ab5838ba479e Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Tue, 12 Sep 2023 00:59:20 -0700
Subject: docs: :memo: major docs improvements

---
 docs/src/components/ClassPropertyRef.tsx | 34 +++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

(limited to 'docs/src/components/ClassPropertyRef.tsx')

diff --git a/docs/src/components/ClassPropertyRef.tsx b/docs/src/components/ClassPropertyRef.tsx
index 46664c4c..7246663b 100644
--- a/docs/src/components/ClassPropertyRef.tsx
+++ b/docs/src/components/ClassPropertyRef.tsx
@@ -4,8 +4,14 @@ 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);
 
@@ -15,10 +21,32 @@ export default function ClassPropertyRef(props: ClassPropertyRefProps) {
         <h4 style={{ display: "inline-block", marginRight: "10px" }}>
           {props.name}
         </h4>
-        <span style={{ color: "red", fontSize: "11px", marginRight: "4px" }}>
-          {props.required && "REQUIRED"}
+        {props.required && (
+          <span
+            style={{
+              color: "red",
+              fontSize: "11px",
+              marginRight: "4px",
+              borderRadius: "4px",
+              border: "1px solid red",
+              padding: "1px 2px",
+            }}
+          >
+            REQUIRED
+          </span>
+        )}
+        <span>
+          {details.type && `(${PYTHON_TYPES[details.type] || details.type})`}
         </span>
-        <span>{details.type && `(${details.type})`}</span>
+
+        {props.default && (
+          <span>
+            {" "}
+            = {details.type === "string" && '"'}
+            {props.default}
+            {details.type === "string" && '"'}
+          </span>
+        )}
       </div>
       <p>{details.description}</p>
     </>
-- 
cgit v1.2.3-70-g09d2

