mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Some checks failed
Build Docker Images / Build docker images (push) Has been cancelled
Build Self-Hosting Docker Images / Build self-host docker images (push) Has been cancelled
Run tests / Run Codebase tests (push) Has been cancelled
Run tests / Build docker images (push) Has been cancelled
37 lines
879 B
TypeScript
37 lines
879 B
TypeScript
/* eslint-disable functional/no-class */
|
|
|
|
import { FloppyDisk } from '@phosphor-icons/react'
|
|
import { PluginComponent } from 'react-markdown-editor-lite'
|
|
import { Button } from '../elements/Button'
|
|
|
|
export default class MDEditorSavePlugin extends PluginComponent {
|
|
static pluginName = 'save'
|
|
|
|
static align = 'right'
|
|
|
|
constructor(props: any) {
|
|
super(props)
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<Button
|
|
style="plainIcon"
|
|
css={{
|
|
alignItems: 'center',
|
|
display: 'flex',
|
|
height: '28px',
|
|
justifyContent: 'center',
|
|
lineHeight: '28px',
|
|
minWidth: '24px',
|
|
}}
|
|
onClick={(event) => {
|
|
document.dispatchEvent(new Event('saveMarkdownNote'))
|
|
event.preventDefault()
|
|
}}
|
|
>
|
|
<FloppyDisk size={18} weight="bold" color="#757575" />
|
|
</Button>
|
|
)
|
|
}
|
|
}
|