CoastalCommitsPastes/client/components/new-post/description/index.tsx
Joaquin "Florius" Azcarate 5df56fbdae
Add description to posts (#71)
Closes #37
2022-04-14 14:25:31 -07:00

25 lines
499 B
TypeScript

import { ChangeEvent, memo } from "react"
import { Input } from "@geist-ui/core"
import styles from "../post.module.css"
type props = {
onChange: (e: ChangeEvent<HTMLInputElement>) => void
description?: string
}
const Description = ({ onChange, description }: props) => {
return (
<div className={styles.description}>
<Input
value={description}
onChange={onChange}
label="Description"
maxLength={256}
width="100%"
/>
</div>
)
}
export default memo(Description)