From c47296a2b5e4bbc90df808ec751be58822490d51 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 30 Sep 2020 21:25:05 +0100 Subject: Add dummy form data for fetching form listings --- src/components/FormListing.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/components') diff --git a/src/components/FormListing.tsx b/src/components/FormListing.tsx index 09b3134..dc761b6 100644 --- a/src/components/FormListing.tsx +++ b/src/components/FormListing.tsx @@ -9,15 +9,15 @@ import Tag from "./Tag"; import colors from "../colors"; +import { Form } from "../api/forms"; + interface FormListingProps { - title: string, - description: string, - open: boolean + form: Form } -function FormListing(props: FormListingProps) { +function FormListing({ form }: FormListingProps) { const listingStyle = css` - background-color: ${props.open ? colors.success : colors.darkButNotBlack}; + background-color: ${form.open ? colors.success : colors.darkButNotBlack}; width: 60%; padding: 20px; margin-top: 20px; @@ -39,14 +39,14 @@ function FormListing(props: FormListingProps) { let closedTag; - if (!props.open) { + if (!form.open) { closedTag = }; return
-

{closedTag}{props.title}

-

{props.description}

+

{closedTag}{form.title}

+

{form.description}

} -- cgit v1.2.3