( widget: RNSpinBox, newProps: SpinBoxProps, oldProps: SpinBoxProps )
| 35 | } |
| 36 | |
| 37 | const setSpinBoxProps = ( |
| 38 | widget: RNSpinBox, |
| 39 | newProps: SpinBoxProps, |
| 40 | oldProps: SpinBoxProps |
| 41 | ) => { |
| 42 | const setter: SpinBoxProps = { |
| 43 | set prefix(prefix: string) { |
| 44 | widget.setPrefix(prefix); |
| 45 | }, |
| 46 | set suffix(suffix: string) { |
| 47 | widget.setSuffix(suffix); |
| 48 | }, |
| 49 | set singleStep(step: number) { |
| 50 | widget.setSingleStep(step); |
| 51 | }, |
| 52 | set range(range: Range) { |
| 53 | widget.setRange(range.minimum, range.maximum); |
| 54 | }, |
| 55 | set value(value: number) { |
| 56 | widget.setValue(value); |
| 57 | } |
| 58 | }; |
| 59 | Object.assign(setter, newProps); |
| 60 | setViewProps(widget, newProps, oldProps); |
| 61 | }; |
| 62 | |
| 63 | /** |
| 64 | * @ignore |
no test coverage detected