@availity/app-icon
Advanced tools
Comparing version 1.3.24 to 1.3.25
@@ -6,2 +6,10 @@ # Change Log | ||
## 1.3.25 (2021-10-19) | ||
**Note:** Version bump only for package @availity/app-icon | ||
## [1.3.24](https://github.com/Availity/availity-react/compare/@availity/app-icon@1.3.23...@availity/app-icon@1.3.24) (2021-10-01) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@availity/app-icon", | ||
"version": "1.3.24", | ||
"version": "1.3.25", | ||
"author": "Evan Sharp <evan.sharp@availity.com>", | ||
@@ -24,2 +24,3 @@ "description": "Availity UI Kit application icon react component.", | ||
"dependencies": { | ||
"classnames": "^2.3.1", | ||
"prop-types": "^15.7.2" | ||
@@ -34,3 +35,3 @@ }, | ||
}, | ||
"gitHead": "cf142eeb3780dfdc5a3b0130e09c4bb6ea0edf07" | ||
"gitHead": "b3d2b222b3aeec7005548254998a8ccda95ef514" | ||
} |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classNames from 'classnames'; | ||
function AppIcon({ tag: Tag, color, size, src: image, alt, branded, className, children, ...props }) { | ||
const classname = [ | ||
className, | ||
'app-icon', | ||
branded ? `app-icon-branded-${color}` : `app-icon-${color}`, | ||
size && `app-icon-${size}`, | ||
image && 'border-0', | ||
] | ||
.filter((a) => a) | ||
.join(' '); | ||
const classes = classNames(className, 'app-icon', { | ||
[`app-icon-${color}`]: color && !branded, | ||
[`app-icon-branded-${color}`]: color && branded, | ||
[`app-icon-${size}`]: size, | ||
'border-0': image, | ||
}); | ||
return ( | ||
<Tag {...props} className={classname}> | ||
<Tag {...props} className={classes}> | ||
{image ? <img className="w-100 h-100 align-baseline" src={image} alt={alt} /> : children} | ||
@@ -18,0 +16,0 @@ {branded && <span className="caret" />} |
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
10086
3
54
+ Addedclassnames@^2.3.1
+ Addedclassnames@2.5.1(transitive)