File tree Expand file tree Collapse file tree 5 files changed +84
-59
lines changed
packages/editor/src/Theme Expand file tree Collapse file tree 5 files changed +84
-59
lines changed Original file line number Diff line number Diff line change 1
1
/** @jsx jsx */
2
2
import { jsx , useThemeUI } from 'theme-ui'
3
+ import { Fragment } from 'react'
3
4
import { Field } from '@theme-ui/components'
4
5
import { EditorContextValue } from '../types'
5
6
@@ -25,17 +26,21 @@ const FontSizes = () => {
25
26
}
26
27
}
27
28
28
- return Object . keys ( fontSizes ) . map ( key => (
29
- < div key = { key } >
30
- < Field < 'input' >
31
- type = "number"
32
- label = { key }
33
- name = { 'fontSizes.' + key }
34
- value = { fontSizes [ key ] }
35
- onChange = { onChange ( key ) }
36
- />
37
- </ div >
38
- ) )
29
+ return (
30
+ < Fragment >
31
+ { Object . keys ( fontSizes ) . map ( key => (
32
+ < div key = { key } >
33
+ < Field < 'input' >
34
+ type = "number"
35
+ label = { key }
36
+ name = { 'fontSizes.' + key }
37
+ value = { fontSizes [ key ] }
38
+ onChange = { onChange ( key ) }
39
+ />
40
+ </ div >
41
+ ) ) }
42
+ </ Fragment >
43
+ )
39
44
}
40
45
41
46
export default FontSizes
Original file line number Diff line number Diff line change 1
1
/** @jsx jsx */
2
2
import { jsx , useThemeUI } from 'theme-ui'
3
+ import { Fragment } from 'react'
3
4
import * as CSS from 'csstype'
4
5
import Combobox from '../Combobox'
5
6
import { EditorContextValue } from '../types'
@@ -18,17 +19,21 @@ const FontWeights = () => {
18
19
} )
19
20
}
20
21
21
- return Object . keys ( fontWeights ) . map ( key => (
22
- < div key = { key } >
23
- < Combobox
24
- label = { key }
25
- name = { 'fontWeights.' + key }
26
- value = { fontWeights [ key ] }
27
- onChange = { onChange ( key ) }
28
- options = { weights }
29
- />
30
- </ div >
31
- ) )
22
+ return (
23
+ < Fragment >
24
+ { Object . keys ( fontWeights ) . map ( key => (
25
+ < div key = { key } >
26
+ < Combobox
27
+ label = { key }
28
+ name = { 'fontWeights.' + key }
29
+ value = { fontWeights [ key ] }
30
+ onChange = { onChange ( key ) }
31
+ options = { weights }
32
+ />
33
+ </ div >
34
+ ) ) }
35
+ </ Fragment >
36
+ )
32
37
}
33
38
34
39
export default FontWeights
Original file line number Diff line number Diff line change 1
1
/** @jsx jsx */
2
- import * as CSS from 'csstype'
3
2
import { jsx , useThemeUI } from 'theme-ui'
3
+ import * as CSS from 'csstype'
4
+ import { Fragment } from 'react'
4
5
import Combobox from '../Combobox'
5
6
import { EditorContextValue } from '../types'
6
7
@@ -39,17 +40,21 @@ const Fonts = ({ options = defaultFonts }) => {
39
40
} )
40
41
}
41
42
42
- return Object . keys ( fonts ) . map ( key => (
43
- < div key = { key } >
44
- < Combobox
45
- label = { key }
46
- name = { 'fonts.' + key }
47
- value = { fonts [ key ] }
48
- onChange = { onChange ( key ) }
49
- options = { options }
50
- />
51
- </ div >
52
- ) )
43
+ return (
44
+ < Fragment >
45
+ { Object . keys ( fonts ) . map ( key => (
46
+ < div key = { key } >
47
+ < Combobox
48
+ label = { key }
49
+ name = { 'fonts.' + key }
50
+ value = { fonts [ key ] }
51
+ onChange = { onChange ( key ) }
52
+ options = { options }
53
+ />
54
+ </ div >
55
+ ) ) }
56
+ </ Fragment >
57
+ )
53
58
}
54
59
55
60
export default Fonts
Original file line number Diff line number Diff line change 1
1
/** @jsx jsx */
2
2
import { jsx , useThemeUI } from 'theme-ui'
3
+ import { Fragment } from 'react'
3
4
import { Field } from '@theme-ui/components'
4
5
import { EditorContextValue } from '../types'
5
6
@@ -18,18 +19,22 @@ export default () => {
18
19
} )
19
20
}
20
21
21
- return Object . keys ( lineHeights ) . map ( key => (
22
- < div key = { key } >
23
- < Field < 'input' >
24
- type = "number"
25
- label = { key }
26
- name = { 'lineHeights.' + key }
27
- value = { lineHeights [ key ] }
28
- onChange = { onChange ( key ) }
29
- min = { 1 }
30
- max = { 3 }
31
- step = { 1 / 64 }
32
- />
33
- </ div >
34
- ) )
22
+ return (
23
+ < Fragment >
24
+ { Object . keys ( lineHeights ) . map ( key => (
25
+ < div key = { key } >
26
+ < Field < 'input' >
27
+ type = "number"
28
+ label = { key }
29
+ name = { 'lineHeights.' + key }
30
+ value = { lineHeights [ key ] }
31
+ onChange = { onChange ( key ) }
32
+ min = { 1 }
33
+ max = { 3 }
34
+ step = { 1 / 64 }
35
+ />
36
+ </ div >
37
+ ) ) }
38
+ </ Fragment >
39
+ )
35
40
}
Original file line number Diff line number Diff line change 1
1
/** @jsx jsx */
2
2
import { jsx , useThemeUI } from 'theme-ui'
3
+ import { Fragment } from 'react'
3
4
import { Field } from '@theme-ui/components'
4
5
import { EditorContextValue } from '../types'
5
6
@@ -27,17 +28,21 @@ const Space = () => {
27
28
}
28
29
}
29
30
30
- return Object . keys ( space ) . map ( key => (
31
- < div key = { key } >
32
- < Field < 'input' >
33
- type = "number"
34
- label = { key }
35
- name = { 'space.' + key }
36
- value = { space [ key ] }
37
- onChange = { onChange ( key ) }
38
- />
39
- </ div >
40
- ) )
31
+ return (
32
+ < Fragment >
33
+ { Object . keys ( space ) . map ( key => (
34
+ < div key = { key } >
35
+ < Field < 'input' >
36
+ type = "number"
37
+ label = { key }
38
+ name = { 'space.' + key }
39
+ value = { space [ key ] }
40
+ onChange = { onChange ( key ) }
41
+ />
42
+ </ div >
43
+ ) ) }
44
+ </ Fragment >
45
+ )
41
46
}
42
47
43
48
export default Space
You can’t perform that action at this time.
0 commit comments