1
1
import React from 'react'
2
- import { Control } from 'react-redux-form '
3
- import { CardBody , FormGroup , Label , Input , FormText } from 'reactstrap'
2
+ import { Field } from 'formik '
3
+ import { CardBody , FormGroup , Label , FormText } from 'reactstrap'
4
4
5
- import Form from '../RRFForm'
5
+ import Form from '../Form'
6
+ import { Input } from '../../../Form'
6
7
import Card from '../../../Card'
7
- import Editor from '../../../Editor'
8
+ import EditorField from '../../../Editor/field '
8
9
9
10
export default ( { id, data } ) =>
10
11
< Card title = "Content"
@@ -19,13 +20,9 @@ export default ({ id, data }) =>
19
20
className = "flex-grow-1 d-flex flex-column"
20
21
>
21
22
< CardBody className = "flex-grow-1 d-flex flex-column" >
22
- < Control . textarea
23
- model = ".context"
24
- component = { Editor }
25
- controlProps = { {
26
- language : 'html' ,
27
- } }
28
- debounce = { 300 }
23
+ < EditorField
24
+ name = "context"
25
+ language = "html"
29
26
/>
30
27
</ CardBody >
31
28
< CardBody
@@ -38,12 +35,10 @@ export default ({ id, data }) =>
38
35
< Label for = "contextSelector" >
39
36
Context selector
40
37
</ Label >
41
- < Control
42
- model = ". contextSelector" id = "contextSelector"
38
+ < Field
39
+ name = " contextSelector" id = "contextSelector"
43
40
component = { Input }
44
- style = { {
45
- fontFamily : 'Fira Code' ,
46
- } }
41
+ className = "text-monospace"
47
42
/>
48
43
< FormText color = "muted" >
49
44
This CSS selector defines where nested components get to insert their content.
0 commit comments