CoastalCommitsPastes/client/app/(posts)/new/components/description/index.tsx

27 lines
552 B
TypeScript
Raw Normal View History

2022-11-16 03:49:12 -05:00
import Input from "@components/input"
import { ChangeEvent, memo } from "react"
import styles from "../post.module.css"
type props = {
onChange: (e: ChangeEvent<HTMLInputElement>) => void
2022-11-09 21:38:05 -05:00
description: string
}
const Description = ({ onChange, description }: props) => {
return (
<div className={styles.description}>
<Input
2022-11-09 21:38:05 -05:00
value={description || ""}
onChange={onChange}
label="Description"
maxLength={256}
width="100%"
2022-11-14 21:39:42 -05:00
placeholder="An optional description of your post"
/>
</div>
)
}
export default Description