1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed inputs

This commit is contained in:
Fedor Katurov 2022-01-04 17:36:05 +07:00
parent 6e89271ea9
commit 811e14fd4c
29 changed files with 566 additions and 901 deletions

View file

@ -4,11 +4,13 @@ import { Textarea } from '~/components/input/Textarea';
import { path } from 'ramda';
import { NodeEditorProps } from '~/types/node';
import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik';
import { useRandomPhrase } from '~/constants/phrases';
type IProps = NodeEditorProps & {};
const TextEditor: FC<IProps> = () => {
const { values, setFieldValue } = useNodeFormContext();
const placeholder = useRandomPhrase('SIMPLE');
const setText = useCallback((text: string) => setFieldValue('blocks', [{ type: 'text', text }]), [
setFieldValue,
@ -18,7 +20,7 @@ const TextEditor: FC<IProps> = () => {
return (
<div className={styles.wrap}>
<Textarea value={text} handler={setText} minRows={6} />
<Textarea value={text} handler={setText} minRows={6} placeholder={placeholder} />
</div>
);
};