add: template editor
This commit is contained in:
16
src/components/MarkdownTemplate/LayoutEditor.js
Normal file
16
src/components/MarkdownTemplate/LayoutEditor.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import React, {useState} from 'react';
|
||||
const LayoutEditor = ({layout, onChange}) => {
|
||||
const [_layout, setLayout] = useState(layout || "");
|
||||
return (
|
||||
<textarea
|
||||
className="textarea"
|
||||
value={_layout}
|
||||
onChange={(e) => {
|
||||
setLayout(e.target.value);
|
||||
onChange(layout);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default LayoutEditor;
|
||||
Reference in New Issue
Block a user