1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-30 15:44:20 +01:00
ipfs-boards/pages/b/[board]/p/new.js

22 lines
585 B
JavaScript
Raw Normal View History

2019-10-26 23:58:20 +02:00
import React, { useState } from 'react'
import { Card, CardContent, TextField, Button } from '@material-ui/core'
import SendIcon from '@material-ui/icons/Send'
export default function CreatePost() {
const [title, setTitle] = useState('')
return <Card>
<CardContent>
<TextField
label="Title"
placeholder="What is your Post about?"
value={title}
onChange={e => setTitle(e.target.value)}
autoFocus
/>
<Button variant="contained" color="primary">
<SendIcon /> Submit
</Button>
</CardContent>
</Card>
}