Skip to content

Commit 196bc70

Browse files
committed
fix Field component type not recognising input props
1 parent aabfc83 commit 196bc70

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

packages/editor/src/Sx/Space.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ export const Space = ({
8686
gridTemplateColumns: 'repeat(3, 1fr)',
8787
alignItems: 'center',
8888
}}>
89-
<Field
90-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
89+
<Field<'input'>
9190
type="number"
9291
name={prefixName('l')}
9392
label={label('Left')}
@@ -99,8 +98,7 @@ export const Space = ({
9998
display: 'grid',
10099
gap: 2,
101100
}}>
102-
<Field
103-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
101+
<Field<'input'>
104102
type="number"
105103
name={prefixName('t')}
106104
label={label('Top')}
@@ -117,17 +115,15 @@ export const Space = ({
117115
Lock y-axis
118116
</Label>
119117
</div>
120-
<Field
121-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
118+
<Field<'input'>
122119
type="number"
123120
name={prefixName('b')}
124121
label={label('Bottom')}
125122
value={b}
126123
onChange={handleChange('b')}
127124
/>
128125
</div>
129-
<Field
130-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
126+
<Field<'input'>
131127
type="number"
132128
name={prefixName('r')}
133129
label={label('Right')}

packages/editor/src/Sx/Typography.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ export const SxTypography = ({
5151
gap: 2,
5252
gridTemplateColumns: 'repeat(3, 1fr)',
5353
}}>
54-
<Field
54+
<Field<'input'>
5555
name={prefixName('fontSize')}
5656
label="Font Size"
57-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why value prop does not exist in type definition.
5857
value={fontSize || ''}
5958
type="number"
6059
onChange={e => {

packages/editor/src/Theme/FontSizes.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ const FontSizes = () => {
2626

2727
return Object.keys(fontSizes).map(key => (
2828
<div key={key}>
29-
<Field
30-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
29+
<Field<'input'>
3130
type="number"
3231
label={key}
3332
name={'fontSizes.' + key}

packages/editor/src/Theme/LineHeights.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export default () => {
1919

2020
return Object.keys(lineHeights).map(key => (
2121
<div key={key}>
22-
<Field
23-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
22+
<Field<'input'>
2423
type="number"
2524
label={key}
2625
name={'lineHeights.' + key}

packages/editor/src/Theme/Space.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ const Space = () => {
2828

2929
return Object.keys(space).map(key => (
3030
<div key={key}>
31-
<Field
32-
// FIXME: Field type is comming from external package @types/theme-ui__components, not sure why type prop does not exist in type definition.
31+
<Field<'input'>
3332
type="number"
3433
label={key}
3534
name={'space.' + key}

0 commit comments

Comments
 (0)