@highlight-ui/button
Advanced tools
Comparing version 12.1.5 to 12.1.6
@@ -374,6 +374,12 @@ 'use strict'; | ||
tone = _c === void 0 ? 'default' : _c, | ||
props = __rest(_a, ["variant", "tone"]); | ||
children = _a.children, | ||
props = __rest(_a, ["variant", "tone", "children"]); | ||
React.useEffect(function () { | ||
if (typeof children !== 'string') { | ||
console.warn('The children property should be passed as string for the button label and will be required in a future release!'); | ||
} | ||
}, [children]); | ||
return React__default["default"].createElement(BaseButton, __assign({}, props, tone === 'critical' ? buttonCriticalToneState[variant] : buttonSuccessToneState.emphasized, tone === 'default' ? buttonVariantToState[variant] : {}, { | ||
ref: ref | ||
})); | ||
}), children); | ||
}); | ||
@@ -380,0 +386,0 @@ Button.displayName = 'Button'; |
@@ -1,2 +0,2 @@ | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import classnames from 'classnames'; | ||
@@ -362,6 +362,12 @@ import { suffixMetadata, parseMetadata } from '@highlight-ui/utils-commons'; | ||
tone = _c === void 0 ? 'default' : _c, | ||
props = __rest(_a, ["variant", "tone"]); | ||
children = _a.children, | ||
props = __rest(_a, ["variant", "tone", "children"]); | ||
useEffect(function () { | ||
if (typeof children !== 'string') { | ||
console.warn('The children property should be passed as string for the button label and will be required in a future release!'); | ||
} | ||
}, [children]); | ||
return /*#__PURE__*/React.createElement(BaseButton, __assign({}, props, tone === 'critical' ? buttonCriticalToneState[variant] : buttonSuccessToneState.emphasized, tone === 'default' ? buttonVariantToState[variant] : {}, { | ||
ref: ref | ||
})); | ||
}), children); | ||
}); | ||
@@ -368,0 +374,0 @@ Button.displayName = 'Button'; |
{ | ||
"name": "@highlight-ui/button", | ||
"version": "12.1.5", | ||
"version": "12.1.6", | ||
"description": "The button", | ||
@@ -61,3 +61,3 @@ "author": "Personio GmbH & Co. KG", | ||
}, | ||
"gitHead": "68cd45c421de0bab020025cb872fa0d5fa273215" | ||
"gitHead": "17126d984a889541794c1516009187e2b4485ef0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
152888
1659