@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
33 lines (10 loc) • 2.02 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject() {var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n .labelled_avatar_label_section {\n .labelled_avatar_label {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 145px;\n }\n }\n\n .labelled_avatar_avatar_section {\n padding-right: 15px;\n }\n\n .labelled_avatar_label_section {\n flex-direction: column;\n justify-content: center;\n }\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react";
import { Avatar } from "../../atoms";
import styled from "styled-components";
var ProfileAvatarWrapper = styled.div(_templateObject());
export default (function (_ref) {var width = _ref.width,height = _ref.height,title = _ref.title,avatar = _ref.avatar,image = _ref.image,avatarColor = _ref.avatarColor,tagText = _ref.tagText,tagPalette = _ref.tagPalette,type = _ref.type,imageOnly = _ref.imageOnly,props = _objectWithoutProperties(_ref, ["width", "height", "title", "avatar", "image", "avatarColor", "tagText", "tagPalette", "type", "imageOnly"]);return /*#__PURE__*/React.createElement(ProfileAvatarWrapper, _extends({}, props), /*#__PURE__*/
React.createElement("div", { className: "labelled_avatar_avatar_section" }, avatar || /*#__PURE__*/React.createElement(Avatar, { theme: props.theme, width: width, height: height, image: image, title: title, palette: avatarColor, type: type || "" })),
!imageOnly ? /*#__PURE__*/React.createElement("div", { className: "labelled_avatar_label_section" }, /*#__PURE__*/
React.createElement("div", { className: "labelled_avatar_label" }, title),
props.children) : null);});
//# sourceMappingURL=index.js.map