2022-04-14 17:25:31 -04:00
|
|
|
import { ChangeEvent, memo } from "react"
|
2022-11-09 21:38:05 -05:00
|
|
|
import { Input } from "@geist-ui/core/dist"
|
2022-04-14 17:25:31 -04:00
|
|
|
|
|
|
|
import styles from "../post.module.css"
|
|
|
|
|
|
|
|
type props = {
|
|
|
|
onChange: (e: ChangeEvent<HTMLInputElement>) => void
|
2022-11-09 21:38:05 -05:00
|
|
|
description: string
|
2022-04-14 17:25:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
const Description = ({ onChange, description }: props) => {
|
|
|
|
return (
|
|
|
|
<div className={styles.description}>
|
|
|
|
<Input
|
2022-11-09 21:38:05 -05:00
|
|
|
value={description || ""}
|
2022-04-14 17:25:31 -04:00
|
|
|
onChange={onChange}
|
|
|
|
label="Description"
|
|
|
|
maxLength={256}
|
|
|
|
width="100%"
|
2022-04-14 20:18:47 -04:00
|
|
|
placeholder="A short description of your post"
|
2022-04-14 17:25:31 -04:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default memo(Description)
|