Skip to content

Commit

Permalink
feat: add type exports for withMask
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOliveiraM committed Feb 27, 2023
1 parent a906e11 commit 0061ee0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/form-utils.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ Using the function without React Hook Form:
```tsx
<input type='text' ref={withMask('9999-9999')} />
```

## Exported Types

```ts
export type WithMaskPattern = Inputmask.Options['mask']
export type WithMaskOptions = Inputmask.Options
```
3 changes: 3 additions & 0 deletions src/utils/form-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ export const withMask =

return input
}

export type WithMaskPattern = Inputmask.Options['mask']
export type WithMaskOptions = Inputmask.Options

0 comments on commit 0061ee0

Please sign in to comment.