@dhis2/ui-constants
Advanced tools
Comparing version
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.statusPropType = exports.statusArgType = exports.sizePropType = exports.sizeArgType = exports.popperReferencePropType = exports.popperReferenceArgType = exports.popperPlacementPropType = exports.popperPlacementArgType = exports.insideAlignmentPropType = exports.insideAlignmentArgType = void 0; | ||
exports.statusPropType = exports.statusArgType = exports.sizePropType = exports.sizeArgType = exports.popperReferencePropType = exports.popperReferenceArgType = exports.popperPlacementPropType = exports.popperPlacementArgType = exports.insideAlignmentPropType = exports.insideAlignmentArgType = exports.buttonVariantPropType = exports.buttonVariantArgType = void 0; | ||
@@ -34,2 +34,24 @@ var _propTypes = require("@dhis2/prop-types"); | ||
/** | ||
* @deprecated Not unused, will be removed in a future version. | ||
* Button variant propType | ||
* @return {PropType} Mutually exclusive variants: | ||
* primary/secondary/destructive | ||
*/ | ||
exports.statusArgType = statusArgType; | ||
const buttonVariantPropType = (0, _propTypes.mutuallyExclusive)(['primary', 'secondary', 'destructive'], _propTypes2.default.bool); | ||
exports.buttonVariantPropType = buttonVariantPropType; | ||
const buttonVariantArgType = { | ||
// No description because it should be set for the component description | ||
table: { | ||
type: { | ||
summary: 'bool', | ||
detail: "'primary', 'secondary', and 'destructive' are mutually exclusive props" | ||
} | ||
}, | ||
control: { | ||
type: 'boolean' | ||
} | ||
}; | ||
/** | ||
* Size variant propType | ||
@@ -40,3 +62,3 @@ * @return {PropType} Mutually exclusive variants: | ||
exports.statusArgType = statusArgType; | ||
exports.buttonVariantArgType = buttonVariantArgType; | ||
const sizePropType = (0, _propTypes.mutuallyExclusive)(['small', 'large', 'extrasmall', 'fluid'], _propTypes2.default.bool); | ||
@@ -43,0 +65,0 @@ exports.sizePropType = sizePropType; |
@@ -22,2 +22,22 @@ import { mutuallyExclusive } from '@dhis2/prop-types'; | ||
/** | ||
* @deprecated Not unused, will be removed in a future version. | ||
* Button variant propType | ||
* @return {PropType} Mutually exclusive variants: | ||
* primary/secondary/destructive | ||
*/ | ||
export const buttonVariantPropType = mutuallyExclusive(['primary', 'secondary', 'destructive'], PropTypes.bool); | ||
export const buttonVariantArgType = { | ||
// No description because it should be set for the component description | ||
table: { | ||
type: { | ||
summary: 'bool', | ||
detail: "'primary', 'secondary', and 'destructive' are mutually exclusive props" | ||
} | ||
}, | ||
control: { | ||
type: 'boolean' | ||
} | ||
}; | ||
/** | ||
* Size variant propType | ||
@@ -24,0 +44,0 @@ * @return {PropType} Mutually exclusive variants: |
{ | ||
"name": "@dhis2/ui-constants", | ||
"version": "8.15.0", | ||
"version": "8.15.1", | ||
"description": "Constants used in the UI libs", | ||
@@ -5,0 +5,0 @@ "main": "./build/cjs/index.js", |
21714
6.74%646
6.6%