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 DecimalSeparatorSelectorProps extends CommonProps { separator : string ; disabled ? : boolean ; onChange : ( value : string ) => void ; } internal export function DecimalSeparatorSelector ( props ) { const { separator , onChange , ... otherProps } = props ; const options = React . useRef < SelectOption < string > [ ] > ( [ { value : "." , label : UiIModelComponents . translate ( "QuantityFormat.decimal_separator.point" ) } , { value : "," , label : UiIModelComponents . translate ( "QuantityFormat.decimal_separator.comma" ) } , ] ) ; const handleOnChange = React . useCallback ( ( newValue ) => { onChange && onChange ( newValue ) ; } , [ onChange ] ) ; return ( < Select options = { options . current } value = { separator } onChange = { handleOnChange } size = "small" { ... otherProps } />); }