@alfalab/core-components-badge
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -5,8 +5,11 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React = require('react'); | ||
var cn = require('classnames'); | ||
var React = _interopDefault(require('react')); | ||
var cn = _interopDefault(require('classnames')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var styles = {"component":"badge__component_av15r","s":"badge__s_av15r","m":"badge__m_av15r","l":"badge__l_av15r","icon":"badge__icon_av15r","positive":"badge__positive_av15r","attention":"badge__attention_av15r","negative":"badge__negative_av15r","tertiary":"badge__tertiary_av15r","primary":"badge__primary_av15r","dot":"badge__dot_av15r","isHidden":"badge__isHidden_av15r"}; | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn); | ||
var styles = {"component":"badge__component_16u61","s":"badge__s_16u61","m":"badge__m_16u61","l":"badge__l_16u61","icon":"badge__icon_16u61","positive":"badge__positive_16u61","attention":"badge__attention_16u61","negative":"badge__negative_16u61","tertiary":"badge__tertiary_16u61","primary":"badge__primary_16u61","dot":"badge__dot_16u61","isHidden":"badge__isHidden_16u61"}; | ||
require('./index.css') | ||
@@ -20,3 +23,3 @@ | ||
var componentContent = isCountView && content && content >= 100 ? '99+' : content; | ||
return (React.createElement("div", { className: cn(styles.component, styles[size], styles[view], iconColor && styles[iconColor], (_b = {}, | ||
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, styles[size], styles[view], iconColor && styles[iconColor], (_b = {}, | ||
_b[styles.isHidden] = isHidden, | ||
@@ -23,0 +26,0 @@ _b[styles.dot] = !content, |
@@ -5,8 +5,12 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React = require('react'); | ||
var cn = require('classnames'); | ||
var styles = require('./index.module.css'); | ||
var React = _interopDefault(require('react')); | ||
var cn = _interopDefault(require('classnames')); | ||
var styles = _interopDefault(require('./index.module.css')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn); | ||
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles); | ||
var Badge = function (_a) { | ||
@@ -18,5 +22,5 @@ var _b; | ||
var componentContent = isCountView && content && content >= 100 ? '99+' : content; | ||
return (React.createElement("div", { className: cn(styles.component, styles[size], styles[view], iconColor && styles[iconColor], (_b = {}, | ||
_b[styles.isHidden] = isHidden, | ||
_b[styles.dot] = !content, | ||
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, styles__default['default'][size], styles__default['default'][view], iconColor && styles__default['default'][iconColor], (_b = {}, | ||
_b[styles__default['default'].isHidden] = isHidden, | ||
_b[styles__default['default'].dot] = !content, | ||
_b), className), "data-test-id": dataTestId }, componentContent)); | ||
@@ -23,0 +27,0 @@ }; |
import React from 'react'; | ||
import cn from 'classnames'; | ||
var styles = {"component":"badge__component_av15r","s":"badge__s_av15r","m":"badge__m_av15r","l":"badge__l_av15r","icon":"badge__icon_av15r","positive":"badge__positive_av15r","attention":"badge__attention_av15r","negative":"badge__negative_av15r","tertiary":"badge__tertiary_av15r","primary":"badge__primary_av15r","dot":"badge__dot_av15r","isHidden":"badge__isHidden_av15r"}; | ||
var styles = {"component":"badge__component_16u61","s":"badge__s_16u61","m":"badge__m_16u61","l":"badge__l_16u61","icon":"badge__icon_16u61","positive":"badge__positive_16u61","attention":"badge__attention_16u61","negative":"badge__negative_16u61","tertiary":"badge__tertiary_16u61","primary":"badge__primary_16u61","dot":"badge__dot_16u61","isHidden":"badge__isHidden_16u61"}; | ||
require('./index.css') | ||
@@ -6,0 +6,0 @@ |
import React from 'react'; | ||
import cn from 'classnames'; | ||
var styles = {"component":"badge__component_av15r","s":"badge__s_av15r","m":"badge__m_av15r","l":"badge__l_av15r","icon":"badge__icon_av15r","positive":"badge__positive_av15r","attention":"badge__attention_av15r","negative":"badge__negative_av15r","tertiary":"badge__tertiary_av15r","primary":"badge__primary_av15r","dot":"badge__dot_av15r","isHidden":"badge__isHidden_av15r"}; | ||
var styles = {"component":"badge__component_16u61","s":"badge__s_16u61","m":"badge__m_16u61","l":"badge__l_16u61","icon":"badge__icon_16u61","positive":"badge__positive_16u61","attention":"badge__attention_16u61","negative":"badge__negative_16u61","tertiary":"badge__tertiary_16u61","primary":"badge__primary_16u61","dot":"badge__dot_16u61","isHidden":"badge__isHidden_16u61"}; | ||
require('./index.css') | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "@alfalab/core-components-badge", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -21,3 +21,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "b8e497302de3841540914c3918284a73df9f84bd" | ||
"gitHead": "2cd9a78cfd6e939d2efc48e4ef8092aa96e9e99b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
19273
590