Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 201a6a5

Browse files
Port frame options to formik
1 parent 91c3713 commit 201a6a5

File tree

1 file changed

+11
-16
lines changed
  • packages/builder/src/components/ComponentOptions/components/Content

1 file changed

+11
-16
lines changed

packages/builder/src/components/ComponentOptions/components/Content/Frame.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
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'
44

5-
import Form from '../RRFForm'
5+
import Form from '../Form'
6+
import { Input } from '../../../Form'
67
import Card from '../../../Card'
7-
import Editor from '../../../Editor'
8+
import EditorField from '../../../Editor/field'
89

910
export default ({ id, data }) =>
1011
<Card title="Content"
@@ -19,13 +20,9 @@ export default ({ id, data }) =>
1920
className="flex-grow-1 d-flex flex-column"
2021
>
2122
<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"
2926
/>
3027
</CardBody>
3128
<CardBody
@@ -38,12 +35,10 @@ export default ({ id, data }) =>
3835
<Label for="contextSelector">
3936
Context selector
4037
</Label>
41-
<Control
42-
model=".contextSelector" id="contextSelector"
38+
<Field
39+
name="contextSelector" id="contextSelector"
4340
component={ Input }
44-
style={{
45-
fontFamily: 'Fira Code',
46-
}}
41+
className="text-monospace"
4742
/>
4843
<FormText color="muted">
4944
This CSS selector defines where nested components get to insert their content.

0 commit comments

Comments
 (0)