UNPKG

@jengaui/utils

Version:

Jenga UI Utils component in React

11 lines (7 loc) 876 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var a={disabled:"isDisabled",loading:"isLoading",selected:"isSelected"},r="JengaUIKit",c=process.env.NODE_ENV!=="production";function p(n,t,o){o.forEach(e=>{if(e in t){let i=a[e];s(`"${e}" property of "${n}" component is deprecated.${i?` Use "${i}" property instead.`:""}`);}});}function d(...n){c&&console.warn(`${r} accessibility issue:`,...n);}function s(...n){c&&console.warn(`${r}:`,...n);}function g(n,{property:t,name:o,betterAlternative:e,reason:i}){n||!c||(console.group(`\u26A0\uFE0F ${r}: Deprecation in ${o}`),s(`"${t}" is deprecated, consider better alternative: ${typeof e=="function"?e():e}`),i&&s(`Reason: ${typeof i=="function"?i():i}`),console.groupEnd());} exports.accessibilityWarning = d; exports.deprecationWarning = g; exports.propDeprecationWarning = p; exports.warn = s;