aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-09-30 21:42:47 +0100
committerGravatar GitHub <[email protected]>2020-09-30 21:42:47 +0100
commitbd171ec8ff84acef0b566efded1c355b336ae127 (patch)
tree08590244748ba796cacb46fd85bc1b09269b0156 /src/components
parentMerge pull request #13 from python-discord/animation/scale-transition-effect (diff)
parentUpdate tests with new FormListing props (diff)
Merge pull request #14 from python-discord/api/add-dummy-forms
Add dummy forms API
Diffstat (limited to 'src/components')
-rw-r--r--src/components/FormListing.tsx16
1 files changed, 8 insertions, 8 deletions
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 = <Tag text="CLOSED" color={colors.error}/>
};
return <Link to="/form" css={listingStyle}>
<div>
- <h3 css={{fontSize: "1.5em", marginBottom: "0"}}>{closedTag}{props.title} <FontAwesomeIcon icon={faArrowRight} css={{fontSize: "0.75em", paddingBottom: "1px"}}/></h3>
- <p css={{marginTop: "5px"}}>{props.description}</p>
+ <h3 css={{fontSize: "1.5em", marginBottom: "0"}}>{closedTag}{form.title} <FontAwesomeIcon icon={faArrowRight} css={{fontSize: "0.75em", paddingBottom: "1px"}}/></h3>
+ <p css={{marginTop: "5px"}}>{form.description}</p>
</div>
</Link>
}