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

Commit 0da0633

Browse files
Port text component to formik
1 parent 5f38675 commit 0da0633

File tree

1 file changed

+11
-12
lines changed
  • packages/builder/src/components/ComponentOptions/components/Content/Page/components/ItemOptions/components

1 file changed

+11
-12
lines changed

packages/builder/src/components/ComponentOptions/components/Content/Page/components/ItemOptions/components/Text.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
import React from 'react'
22

3-
import { Control } from 'react-redux-form'
4-
import { Row, Col, Input } from 'reactstrap'
3+
import { Field } from 'formik'
4+
import { Row, Col } from 'reactstrap'
55

6-
export default () =>
6+
import { Input } from '../../../../../../../Form'
7+
8+
export default ({ name }) =>
79
<>
810
<Row form>
911
<Col>
10-
<Control
11-
model=".title"
12+
<Field
13+
name={ `${ name }.title` }
1214
placeholder="Title"
1315
component={ Input }
1416
className="font-weight-bold"
15-
debounce={ 300 }
1617
/>
1718
</Col>
1819
</Row>
1920
<Row form>
2021
<Col>
21-
<Control.textarea
22-
model=".content"
22+
<Field
23+
name={ `${ name }.content` }
24+
as="textarea"
2325
placeholder="Text"
24-
component={ Input }
25-
controlProps={{ type: 'textarea' }}
26-
className="mt-2"
27-
debounce={ 300 }
26+
className="form-control mt-2"
2827
/>
2928
</Col>
3029
</Row>

0 commit comments

Comments
 (0)