Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codecademy/brand-components

Package Overview
Dependencies
Maintainers
1
Versions
462
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codecademy/brand-components - npm Package Compare versions

Comparing version 0.0.2-alpha.1a294c.1457 to 0.0.2-alpha.42d72b.1461

dist/brand-components/src/index.d.ts

16

dist/Avatar/index.js

@@ -11,17 +11,19 @@ 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); }

import { VisualTheme } from '../../../gamut/src/theming/VisualTheme';
export function Avatar(_ref) {
export var Avatar = function Avatar(_ref) {
var _ref$size = _ref.size,
size = _ref$size === void 0 ? 'regular' : _ref$size,
label = _ref.label,
_ref$theme = _ref.theme,
theme = _ref$theme === void 0 ? VisualTheme.LightMode : _ref$theme,
props = _objectWithoutProperties(_ref, ["size", "theme"]);
imageProps = _objectWithoutProperties(_ref, ["size", "label", "theme"]);
var imageProps = _extends({}, props);
return React.createElement("div", {
className: cx(s.container, s["".concat(size, "Container")], theme === VisualTheme.DarkMode ? s.darkContainer : s.lightContainer)
className: cx(s.container, s["".concat(size, "Container")], theme === VisualTheme.DarkMode ? s.darkContainer : s.lightContainer),
"aria-labelledby": label
}, React.createElement("img", _extends({
className: cx(s.image, s["".concat(size, "Image")])
}, imageProps)));
}
}, imageProps, {
alt: label
})));
};
export default Avatar;

@@ -1,10 +0,11 @@

import { HTMLAttributes } from 'react';
import React, { HTMLAttributes } from 'react';
import { VisualTheme } from '../../../gamut/src/theming/VisualTheme';
export declare type AvatarProps = HTMLAttributes<HTMLImageElement> & {
export declare type AvatarProps = {
src: string;
alt: string;
label: string;
size?: 'regular' | 'large';
theme: VisualTheme;
theme?: VisualTheme;
imageProps?: HTMLAttributes<HTMLImageElement>;
};
export declare function Avatar({ size, theme, ...props }: AvatarProps): JSX.Element;
export declare const Avatar: React.FC<AvatarProps>;
export default Avatar;
{
"name": "@codecademy/brand-components",
"description": "Brand component library for Codecademy",
"version": "0.0.2-alpha.1a294c.1457+1a294cf2",
"version": "0.0.2-alpha.42d72b.1461+42d72b10",
"author": "Codecademy Engineering <dev@codecademy.com>",

@@ -37,3 +37,3 @@ "sideEffects": [

},
"gitHead": "1a294cf2e69c16f4484440232824827c0a0696db"
"gitHead": "42d72b1022727cf4c7924280afb74a9bb4d85fd9"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc