@dhis2/prop-types
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -24,2 +24,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "requiredIf", { | ||
enumerable: true, | ||
get: function get() { | ||
return _requiredIf.requiredIf; | ||
} | ||
}); | ||
exports.default = void 0; | ||
@@ -26,0 +32,0 @@ |
@@ -63,2 +63,7 @@ "use strict"; | ||
* } | ||
* | ||
* // Enforce presence of a multiple children, all Button instances | ||
* ButtonWrap.propTypes = { | ||
* children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired | ||
* } | ||
*/ | ||
@@ -65,0 +70,0 @@ |
@@ -56,3 +56,3 @@ "use strict"; | ||
* import React from 'react' | ||
* import { propTypes } from '@dhis2/prop-types' | ||
* import { requiredIf } from '@dhis2/prop-types' | ||
* | ||
@@ -59,0 +59,0 @@ * const Test = ({ someBool, someString }) => ( |
@@ -10,3 +10,3 @@ import propTypes from 'prop-types'; | ||
propTypes.requiredIf = requiredIf; | ||
export { arrayWithLength, instanceOfComponent, mutuallyExclusive }; | ||
export { arrayWithLength, instanceOfComponent, mutuallyExclusive, requiredIf }; | ||
export default propTypes; |
@@ -54,2 +54,7 @@ const instanceOfComponentFactory = (Component, isRequired) => (props, propSelector, // normally a propName, but when wrapped in arrayOf an index | ||
* } | ||
* | ||
* // Enforce presence of a multiple children, all Button instances | ||
* ButtonWrap.propTypes = { | ||
* children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired | ||
* } | ||
*/ | ||
@@ -56,0 +61,0 @@ |
@@ -42,3 +42,3 @@ import propTypes from 'prop-types'; | ||
* import React from 'react' | ||
* import { propTypes } from '@dhis2/prop-types' | ||
* import { requiredIf } from '@dhis2/prop-types' | ||
* | ||
@@ -45,0 +45,0 @@ * const Test = ({ someBool, someString }) => ( |
@@ -0,1 +1,8 @@ | ||
# [1.4.0](https://github.com/dhis2/prop-types/compare/v1.3.0...v1.4.0) (2019-11-21) | ||
### Features | ||
* **index js:** add requiredIf to named exports ([#75](https://github.com/dhis2/prop-types/issues/75)) ([cf6697e](https://github.com/dhis2/prop-types/commit/cf6697e6a213b76c8c047355149681339c2d92a5)) | ||
# [1.3.0](https://github.com/dhis2/prop-types/compare/v1.2.2...v1.3.0) (2019-11-07) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@dhis2/prop-types", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"main": "./build/cjs/index.js", | ||
@@ -26,5 +26,5 @@ "module": "./build/es/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.6.4", | ||
"@babel/core": "^7.6.4", | ||
"@babel/preset-env": "^7.6.3", | ||
"@babel/cli": "^7.7.0", | ||
"@babel/core": "^7.7.2", | ||
"@babel/preset-env": "^7.7.1", | ||
"@dhis2/cli-style": "4.2.0", | ||
@@ -31,0 +31,0 @@ "babel-eslint": "^10.0.3", |
@@ -89,2 +89,7 @@ # DHIS2 propTypes | ||
} | ||
// Enforce presence of a multiple children, all Button instances | ||
ButtonWrap.propTypes = { | ||
children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired | ||
} | ||
``` | ||
@@ -143,3 +148,3 @@ <a name="mutuallyExclusive"></a> | ||
import React from 'react' | ||
import { propTypes } from '@dhis2/prop-types' | ||
import { requiredIf } from '@dhis2/prop-types' | ||
@@ -146,0 +151,0 @@ const Test = ({ someBool, someString }) => ( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34918
541
160