@grandlinex/react-components
Version:
18 lines (17 loc) • 880 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const util_1 = require("../../../util");
const Persona = (prop) => {
const { text, color, size, small, img, lazy } = prop;
return (react_1.default.createElement("div", { className: "glx-persona" },
react_1.default.createElement("div", { style: {
backgroundColor: color,
width: size,
height: size,
}, className: (0, util_1.cnx)(`glx-persona--center`, [!!small, ' glx-persona--small']) }, img ? (react_1.default.createElement("img", { src: img, alt: "img", loading: lazy ? 'lazy' : undefined })) : (text))));
};
exports.default = Persona;