@igloo-ui/icon-button
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -184,3 +184,15 @@ import './icon-button.css'; | ||
const childrenIsAString = typeof children === 'string' || children instanceof String; | ||
const classes = cx('ids-btn', className, { | ||
const normalizeAppearanceClass = (appearance) => { | ||
if (typeof appearance === 'object') { | ||
return { | ||
[`ids-btn--${appearance.type}`]: appearance.type, | ||
[`ids-btn--${appearance.type}-${appearance.variant}`]: appearance.variant, | ||
}; | ||
} | ||
return { | ||
[`ids-btn--${appearance}`]: appearance !== 'primary', | ||
}; | ||
}; | ||
const apperanceClasses = normalizeAppearanceClass(appearance); | ||
const classes = cx('ids-btn', className, apperanceClasses, { | ||
'ids-btn--small': size === 'small', | ||
@@ -194,3 +206,2 @@ 'ids-btn--active': active, | ||
'has-icon--trailing': hasIconTrailing, | ||
[`ids-btn--${appearance}`]: appearance !== 'primary', | ||
}); | ||
@@ -197,0 +208,0 @@ const renderContent = () => { |
{ | ||
"name": "@igloo-ui/icon-button", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"main": "dist/IconButton.js", | ||
@@ -24,8 +24,8 @@ "module": "dist/IconButton.js", | ||
"dependencies": { | ||
"@igloo-ui/button": "^0.2.2", | ||
"@igloo-ui/tokens": "^1.1.0", | ||
"@igloo-ui/button": "^0.3.0", | ||
"@igloo-ui/tokens": "^1.1.1", | ||
"classnames": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"@igloo-ui/icons": "^0.6.5" | ||
"@igloo-ui/icons": "^1.0.0" | ||
}, | ||
@@ -37,3 +37,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "a59c6efd167e1cb3619a1e90230b1db6fc17bd9e" | ||
"gitHead": "77bf6715869bf65e9109a007a43cf5a2590641b5" | ||
} |
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
37367
222
+ Added@igloo-ui/button@0.3.7(transitive)
+ Added@igloo-ui/tokens@2.1.0(transitive)
+ Addedcamelcase@7.0.1(transitive)
- Removed@igloo-ui/button@0.2.3(transitive)
Updated@igloo-ui/button@^0.3.0
Updated@igloo-ui/tokens@^1.1.1