From b9965e8bf99de0b3621dae9fc52628279f667826 Mon Sep 17 00:00:00 2001 From: Kenji Shiroma Date: Thu, 23 Nov 2023 16:58:49 +1000 Subject: [PATCH] closes #357 compacta examples --- .../components/compacta/code.mdoc | 75 +++++++++++-------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/apps/site/src/content/design-system/components/compacta/code.mdoc b/apps/site/src/content/design-system/components/compacta/code.mdoc index cf23cc89c..b19e6fa9a 100644 --- a/apps/site/src/content/design-system/components/compacta/code.mdoc +++ b/apps/site/src/content/design-system/components/compacta/code.mdoc @@ -1,52 +1,67 @@ -## Collapsible sizes +### Default compacta example ```tsx () => { const [inputs, setInputs] = useState({}); - const handleChange = (e: ChangeEvent) => { - setInputs((prev: object) => ({ ...prev, [e.target.name]: e.target.value })); + const handleChange = e => { + setInputs(prev => ({ ...prev, [e.target.name]: e.target.value })); }; return ( {({ id, setPrimaryTitle, setSecondaryTitle, setTertiaryTitle }) => ( -
+ - Primary - Primary title text - { - handleChange(e); - setPrimaryTitle(e.target.value); - }} - /> + + + - Secondary - Secondary title text - { - handleChange(e); - setSecondaryTitle(e.target.value); - }} - /> + + { + handleChange(e); + setSecondaryTitle(e.target.value); + }} + width={30} + /> + - Tertiary - Tertiary title text - { handleChange(e); setTertiaryTitle(e.target.value); }} - /> + width={20} + before="$" + label="Amount to transfer" + > + +
)}