Skip to content

Commit

Permalink
feat: add custom prop types to propTypes object (#39)
Browse files Browse the repository at this point in the history
* feat: add custom prop types to propTypes object

* fix: export named function too
  • Loading branch information
HendrikThePendric authored Sep 11, 2019
1 parent bd039d5 commit e23ffb7
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
export { arrayWithLength } from './arrayWithLength'
export { instanceOfComponent } from './instanceOfComponent'
export { mutuallyExclusive } from './mutuallyExclusive'
import propTypes from 'prop-types'

import { arrayWithLength } from './arrayWithLength.js'
import { instanceOfComponent } from './instanceOfComponent.js'
import { mutuallyExclusive } from './mutuallyExclusive.js'

const customPropTypes = {
arrayWithLength,
instanceOfComponent,
mutuallyExclusive,
}

export { arrayWithLength, instanceOfComponent, mutuallyExclusive }

export default {
...propTypes,
...customPropTypes,
}

0 comments on commit e23ffb7

Please sign in to comment.