Skip to content

Commit e23ffb7

Browse files
feat: add custom prop types to propTypes object (#39)
* feat: add custom prop types to propTypes object * fix: export named function too
1 parent bd039d5 commit e23ffb7

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

src/index.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
export { arrayWithLength } from './arrayWithLength'
2-
export { instanceOfComponent } from './instanceOfComponent'
3-
export { mutuallyExclusive } from './mutuallyExclusive'
1+
import propTypes from 'prop-types'
2+
3+
import { arrayWithLength } from './arrayWithLength.js'
4+
import { instanceOfComponent } from './instanceOfComponent.js'
5+
import { mutuallyExclusive } from './mutuallyExclusive.js'
6+
7+
const customPropTypes = {
8+
arrayWithLength,
9+
instanceOfComponent,
10+
mutuallyExclusive,
11+
}
12+
13+
export { arrayWithLength, instanceOfComponent, mutuallyExclusive }
14+
15+
export default {
16+
...propTypes,
17+
...customPropTypes,
18+
}

0 commit comments

Comments
 (0)