feat: Story form, Post content editor, File Input Component, File thumbnail component, change from css to scss

This commit is contained in:
MTG2000
2022-04-27 14:35:49 +03:00
parent 4957dad00b
commit af253c980e
20 changed files with 616 additions and 20 deletions

View File

@@ -0,0 +1,26 @@
import React from 'react'
import { EditorComponent, Remirror, useHelpers, useRemirror, useEvent, useEditorState } from '@remirror/react';
import { Control, useController } from 'react-hook-form';
interface Props {
control?: Control,
name?: string
}
export default function SaveModule(props: Props) {
const state = useEditorState()
const { getMarkdown } = useHelpers();
const { field: { onChange, onBlur } } = useController({
control: props.control,
name: props.name ?? 'content'
})
useEvent('blur', () => {
onChange(getMarkdown(state));
onBlur()
})
return <></>
}