@react-md/avatar
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
@@ -23,2 +23,4 @@ var __assign = (this && this.__assign) || function () { | ||
import cn from "classnames"; | ||
import { bem } from "@react-md/theme"; | ||
var block = bem("rmd-avatar"); | ||
/** | ||
@@ -35,7 +37,5 @@ * An `Avatar` is generally used to represent objects or people within your app. | ||
if (src) { | ||
img = (React.createElement("img", { src: src, alt: alt, role: "presentation", className: "rmd-avatar__image" })); | ||
img = React.createElement("img", { src: src, alt: alt, className: block("image") }); | ||
} | ||
return (React.createElement("span", __assign({}, props, { ref: forwardedRef, className: cn("rmd-avatar", (_a = {}, | ||
_a["rmd-avatar--" + color] = color, | ||
_a), className) }), | ||
return (React.createElement("span", __assign({}, props, { ref: forwardedRef, className: cn(block((_a = {}, _a[color] = color, _a)), className) }), | ||
img, | ||
@@ -45,2 +45,3 @@ children)); | ||
var defaultProps = { | ||
color: "", | ||
alt: "", | ||
@@ -47,0 +48,0 @@ }; |
@@ -35,2 +35,4 @@ "use strict"; | ||
var classnames_1 = __importDefault(require("classnames")); | ||
var theme_1 = require("@react-md/theme"); | ||
var block = theme_1.bem("rmd-avatar"); | ||
/** | ||
@@ -47,7 +49,5 @@ * An `Avatar` is generally used to represent objects or people within your app. | ||
if (src) { | ||
img = (react_1.default.createElement("img", { src: src, alt: alt, role: "presentation", className: "rmd-avatar__image" })); | ||
img = react_1.default.createElement("img", { src: src, alt: alt, className: block("image") }); | ||
} | ||
return (react_1.default.createElement("span", __assign({}, props, { ref: forwardedRef, className: classnames_1.default("rmd-avatar", (_a = {}, | ||
_a["rmd-avatar--" + color] = color, | ||
_a), className) }), | ||
return (react_1.default.createElement("span", __assign({}, props, { ref: forwardedRef, className: classnames_1.default(block((_a = {}, _a[color] = color, _a)), className) }), | ||
img, | ||
@@ -57,2 +57,3 @@ children)); | ||
var defaultProps = { | ||
color: "", | ||
alt: "", | ||
@@ -59,0 +60,0 @@ }; |
{ | ||
"name": "@react-md/avatar", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"description": "This package is used to avatars which are used to symbolize people or objects.", | ||
@@ -33,5 +33,5 @@ "scripts": { | ||
"dependencies": { | ||
"@react-md/icon": "^2.0.0-alpha.0", | ||
"@react-md/theme": "^2.0.0-alpha.0", | ||
"@react-md/utils": "^2.0.0-alpha.0", | ||
"@react-md/icon": "^2.0.0-alpha.1", | ||
"@react-md/theme": "^2.0.0-alpha.1", | ||
"@react-md/utils": "^2.0.0-alpha.1", | ||
"classnames": "^2.2.6" | ||
@@ -48,3 +48,3 @@ }, | ||
}, | ||
"gitHead": "cc5de21740e62c1fd5da8f832f562c48eb028717" | ||
"gitHead": "9197bcdf38df3cff304499431696dc8e950b4b17" | ||
} |
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
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
2
50849
32
572