From 331b2adcb6f8d962e4ed19292fd2ab5838ba479e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 12 Sep 2023 00:59:20 -0700 Subject: docs: :memo: major docs improvements --- docs/src/components/ClassPropertyRef.tsx | 34 +++++++++++++++++++++++++++++--- docs/src/css/custom.css | 16 +++++++-------- 2 files changed, 39 insertions(+), 11 deletions(-) (limited to 'docs/src') 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) {

{props.name}

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

{details.description}

diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 794febaf..3a7178dd 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -18,13 +18,13 @@ } /* For readability concerns, you should choose a lighter palette in dark mode. */ -[data-theme='dark'] { - --ifm-color-primary: #be1b55ff; - --ifm-color-primary-dark: #be1b55ff; - --ifm-color-primary-darker: #be1b55ff; - --ifm-color-primary-darkest: #be1b55ff; - --ifm-color-primary-light: #be1b55ff; - --ifm-color-primary-lighter: #be1b55ff; - --ifm-color-primary-lightest: #be1b55ff; +[data-theme="dark"] { + --ifm-color-primary: #59bc89ff; + --ifm-color-primary-dark: #59bc89ff; + --ifm-color-primary-darker: #59bc89ff; + --ifm-color-primary-darkest: #59bc89ff; + --ifm-color-primary-light: #59bc89ff; + --ifm-color-primary-lighter: #59bc89ff; + --ifm-color-primary-lightest: #59bc89ff; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } -- cgit v1.2.3-70-g09d2