MCPcopy Index your code
hub / github.com/nodegui/react-nodegui / setSpinBoxProps

Function setSpinBoxProps

src/components/SpinBox/RNSpinBox.ts:37–61  ·  view source on GitHub ↗
(
  widget: RNSpinBox,
  newProps: SpinBoxProps,
  oldProps: SpinBoxProps
)

Source from the content-addressed store, hash-verified

35}
36
37const 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

Callers 1

setPropsMethod · 0.85

Calls 1

setViewPropsFunction · 0.90

Tested by

no test coverage detected