breeffy / react-native-monorepo

Monorepo with UI components.
Apache License 2.0
183 stars 8 forks source link

Allow items to be strings convertible to numbers #143

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago

In <NumberPicker ... /> component items property is number[]. If we use specially formatted numbers by Intl.NumberFormat items might become strings.

const HourAndMinutesNumberFormat = new Intl.NumberFormat('en-US', {
  style: 'decimal',
  // @ts-ignore
  signDisplay: 'never',
  useGrouping: false,
  minimumIntegerDigits: 2
});

We can allow items to be strings, but which should be convertible to numbers. closes #142