@codecademy/brand-components
Advanced tools
Comparing version 0.3.5-alpha.27f01b.7 to 0.3.5-alpha.4d23dd.3
@@ -12,4 +12,4 @@ import React from 'react'; | ||
src: string; | ||
size?: 'regular' | 'large'; | ||
theme?: VisualTheme; | ||
className?: string; | ||
}; | ||
@@ -16,0 +16,0 @@ declare type AvatarProps = AvatarBaseProps & AvatarImageProps; |
@@ -1,3 +0,1 @@ | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
@@ -12,14 +10,11 @@ | ||
export var Avatar = function Avatar(_ref) { | ||
var _ref$size = _ref.size, | ||
size = _ref$size === void 0 ? 'regular' : _ref$size, | ||
_ref$theme = _ref.theme, | ||
var _ref$theme = _ref.theme, | ||
theme = _ref$theme === void 0 ? VisualTheme.LightMode : _ref$theme, | ||
avatarImageProps = _objectWithoutProperties(_ref, ["size", "theme"]); | ||
className = _ref.className, | ||
avatarImageProps = _objectWithoutProperties(_ref, ["theme", "className"]); | ||
return React.createElement("div", { | ||
className: cx(s.container, s["".concat(size, "Container")], theme === VisualTheme.DarkMode ? s.darkContainer : s.lightContainer) | ||
}, React.createElement("img", _extends({ | ||
className: cx(s.image, s["".concat(size, "Image")]) | ||
}, avatarImageProps))); | ||
className: cx(s.container, className, theme === VisualTheme.DarkMode ? s.darkContainer : s.lightContainer) | ||
}, React.createElement("img", avatarImageProps)); | ||
}; | ||
export default Avatar; |
{ | ||
"name": "@codecademy/brand-components", | ||
"description": "Brand component library for Codecademy", | ||
"version": "0.3.5-alpha.27f01b.7+27f01b23", | ||
"version": "0.3.5-alpha.4d23dd.3+4d23ddb0", | ||
"author": "Codecademy Engineering <dev@codecademy.com>", | ||
@@ -21,3 +21,3 @@ "sideEffects": [ | ||
"dependencies": { | ||
"@codecademy/gamut": "^2.6.2-alpha.27f01b.7+27f01b23", | ||
"@codecademy/gamut": "^2.6.1", | ||
"@codecademy/gamut-styles": "^2.2.11", | ||
@@ -35,3 +35,3 @@ "classnames": "^2.2.5" | ||
"license": "MIT", | ||
"gitHead": "27f01b23c78c3e88a6ecae390c2d9356cdc0cde0" | ||
"gitHead": "4d23ddb0bdc5d2772978093477c5bbc6f12d40a8" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
40925
693
Updated@codecademy/gamut@^2.6.1