mirror of
https://github.com/He4eT/huge-link.git
synced 2026-05-05 00:47:27 +00:00
28 lines
698 B
JavaScript
28 lines
698 B
JavaScript
import {h} from 'preact'
|
|
import {Link} from 'preact-router/match'
|
|
|
|
import style from './style.css'
|
|
|
|
const Editor = ({markdown, setMarkdown}) => (
|
|
<section>
|
|
<h1>Huge link</h1>
|
|
<p>
|
|
A minimalist serverless publishing tool
|
|
that allows you to create markdown posts and
|
|
push them to the Web by sharing the link.
|
|
</p>
|
|
<textarea
|
|
class={ style.textarea }
|
|
placeholder="Write a post using markdown and click Preview"
|
|
onInput={ ({target}) => setMarkdown(target.value) }>
|
|
{ markdown }
|
|
</textarea>
|
|
|
|
<nav>
|
|
<Link href='/huge-link/preview'>
|
|
Preview
|
|
</Link>
|
|
</nav>
|
|
</section>)
|
|
|
|
export default Editor
|