From e1a0c45616cf9c8c4be8a1c9382eaad97f7aca21 Mon Sep 17 00:00:00 2001 From: Ken Blanchard Date: Fri, 15 Nov 2024 14:28:50 -0400 Subject: [PATCH] Add variant for collapse component styling --- src/components/Collapse.tsx | 19 ++++++++----------- src/pages/email.tsx | 7 ++----- src/pages/expectations.tsx | 6 +----- src/pages/landing.tsx | 18 +++--------------- src/pages/status.tsx | 5 +---- 5 files changed, 15 insertions(+), 40 deletions(-) diff --git a/src/components/Collapse.tsx b/src/components/Collapse.tsx index 43f34184c..7330b5b57 100644 --- a/src/components/Collapse.tsx +++ b/src/components/Collapse.tsx @@ -1,29 +1,26 @@ import { useId } from 'react' +const variants = { + slim: 'text-base', + default: 'rounded border', +} export interface CollapseProps { title: string children?: React.ReactNode - detailProps?: string - summaryProps?: string + variant?: keyof typeof variants } -const Collapse = ({ - title, - children, - detailProps, - summaryProps, -}: CollapseProps) => { +const Collapse = ({ title, children, variant = 'default' }: CollapseProps) => { const id = useId() return (
{title} diff --git a/src/pages/email.tsx b/src/pages/email.tsx index cfe1d8f79..45c234ddf 100644 --- a/src/pages/email.tsx +++ b/src/pages/email.tsx @@ -245,10 +245,7 @@ const Email = () => { required helpMessage={t('email.help-message')} extraContent={ - +

@@ -270,7 +267,7 @@ const Email = () => { } extraContent={ - +

diff --git a/src/pages/expectations.tsx b/src/pages/expectations.tsx index 65614d55e..eb5f54206 100644 --- a/src/pages/expectations.tsx +++ b/src/pages/expectations.tsx @@ -46,11 +46,7 @@ const Expectations = () => {

{t('not-liable')}

{t('header-privacy')}

{t('privacy-description')}

- +

diff --git a/src/pages/landing.tsx b/src/pages/landing.tsx index 47b9eeda2..3ca5d57d4 100644 --- a/src/pages/landing.tsx +++ b/src/pages/landing.tsx @@ -53,11 +53,7 @@ const Landing = () => { {t('where-to-find.applied-in-person.header')}

{t('where-to-find.applied-in-person.text')}

- +
{
- +
{
- +
{ } extraContent={ - +