@@ -232,6 +232,14 @@ type PropsPassedToSelect = {
232232 * If the selected `SimpleSelect.Option`'s `renderAfterLabel` value is empty, default arrow icon will be rendered.
233233 */
234234 isOptionContentAppliedToInput ?: boolean
235+
236+ /**
237+ * In `stacked` mode the input is below the label.
238+ *
239+ * In `inline` mode the input is to the right/left (depending on text direction) of the label,
240+ * and the layout will look like `stacked` for small screens.
241+ */
242+ layout ?: 'stacked' | 'inline'
235243}
236244
237245type PropKeys = keyof SimpleSelectOwnProps
@@ -248,6 +256,7 @@ type SimpleSelectProps = PickPropsWithExceptions<
248256 | 'onRequestSelectOption'
249257 | 'inputValue'
250258 | 'isShowingOptions'
259+ | 'layout'
251260> &
252261 SimpleSelectOwnProps &
253262 OtherHTMLAttributes <
@@ -294,7 +303,8 @@ const propTypes: PropValidators<PropKeys> = {
294303 renderBeforeInput : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . func ] ) ,
295304 renderAfterInput : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . func ] ) ,
296305 children : ChildrenPropTypes . oneOf ( [ Group , Option ] ) ,
297- isOptionContentAppliedToInput : PropTypes . bool
306+ isOptionContentAppliedToInput : PropTypes . bool ,
307+ layout : PropTypes . oneOf ( [ 'stacked' , 'inline' ] )
298308}
299309
300310const allowedProps : AllowedPropKeys = [
@@ -326,7 +336,8 @@ const allowedProps: AllowedPropKeys = [
326336 'renderEmptyOption' ,
327337 'renderBeforeInput' ,
328338 'renderAfterInput' ,
329- 'children'
339+ 'children' ,
340+ 'layout'
330341]
331342
332343export type { SimpleSelectProps , SimpleSelectState }
0 commit comments