packageDocumentation module import * as React from "react" ; import { CommonProps } from "@itwin/core-react" ; import { UiIModelComponents } from "../../UiIModelComponents" ; import { Select , SelectOption } from "@itwin/itwinui-react" ; internal export interface StationSizeSelectorProps extends CommonProps { value : number ; disabled : boolean ; onChange : ( value : number ) => void ; } internal export function StationSizeSelector ( props ) { const { value , disabled , onChange , ... otherProps } = props ; const separatorOptions = React . useRef < SelectOption < number > [ ] > ( [ { value : 2 , label : UiIModelComponents . translate ( "QuantityFormat.station_size.two" ) } , { value : 3 , label : UiIModelComponents . translate ( "QuantityFormat.station_size.three" ) } , ] ) ; const handleOnChange = React . useCallback ( ( newValue ) => { onChange && onChange ( newValue ) ; } , [ onChange ] ) ; return ( < Select options = { separatorOptions . current } disabled = { disabled } value = { value } onChange = { handleOnChange } size = "small" { ... otherProps } />); }