@@ -9,7 +9,11 @@ import {
9
9
} from 'react' ;
10
10
import { useFormProps } from './Form' ;
11
11
import { mergeProps } from '../../../utils/react' ;
12
- import { OptionalFieldBaseProps , ValidationRule } from '../../../shared' ;
12
+ import {
13
+ LabelPosition ,
14
+ OptionalFieldBaseProps ,
15
+ ValidationRule ,
16
+ } from '../../../shared' ;
13
17
import { CubeFormInstance } from './useForm' ;
14
18
import { FieldWrapper } from '../FieldWrapper' ;
15
19
import { Styles } from '../../../tasty' ;
@@ -120,6 +124,7 @@ export interface CubeFieldProps extends OptionalFieldBaseProps {
120
124
/** Whether the field is hidden. */
121
125
isHidden ?: boolean ;
122
126
styles ?: Styles ;
127
+ labelPosition ?: LabelPosition ;
123
128
}
124
129
125
130
interface CubeFullFieldProps extends CubeFieldProps {
@@ -132,6 +137,7 @@ interface CubeReplaceFieldProps extends CubeFieldProps {
132
137
onSelectionChange ?: ( any ) => void ;
133
138
onBlur : ( ) => void ;
134
139
onInputChange ?: ( any ) => void ;
140
+ labelPosition ?: LabelPosition ;
135
141
}
136
142
137
143
export function Field ( allProps : CubeFieldProps ) {
@@ -158,6 +164,7 @@ export function Field(allProps: CubeFieldProps) {
158
164
tooltip,
159
165
isHidden,
160
166
styles,
167
+ labelPosition,
161
168
} = props ;
162
169
const nonInput = ! name ;
163
170
const fieldName : string =
@@ -229,6 +236,7 @@ export function Field(allProps: CubeFieldProps) {
229
236
description = { description }
230
237
Component = { child }
231
238
styles = { styles }
239
+ labelPosition = { labelPosition }
232
240
/>
233
241
) ;
234
242
}
0 commit comments