react-number-format icon indicating copy to clipboard operation
react-number-format copied to clipboard

feat: export SourceType enum

Open codebutler opened this issue 1 year ago • 0 comments

Describe the issue/change

Gives consumers of this library a way to properly avoid triggering the eslint rule @typescript-eslint/no-unsafe-enum-comparison.

Add CodeSandbox link to illustrate the issue (If applicable)

Describe specs for failing cases if this is an issue (If applicable)

Describe the changes proposed/implemented in this PR

Add export.

Link Github issue if this PR solved an existing issue

Example usage (If applicable)

import { SourceType } from "react-number-format";

onValueChange={(values, sourceInfo) => {
  if (sourceInfo.source === SourceType.event) {
    // do something
  }
}}

Screenshot (If applicable)

Please check which browsers were used for testing

  • [ ] Chrome
  • [ ] Chrome (Android)
  • [ ] Safari (OSX)
  • [ ] Safari (iOS)
  • [ ] Firefox
  • [ ] Firefox (Android)

codebutler avatar Apr 15 '25 16:04 codebutler