@redocly/theme
Version:
Shared UI components lib
49 lines • 2.18 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Email = void 0;
exports.CatalogUserEntityCell = CatalogUserEntityCell;
const react_1 = __importDefault(require("react"));
const styled_components_1 = __importDefault(require("styled-components"));
const CatalogHighlight_1 = require("../../../components/Catalog/CatalogHighlight");
const CatalogAvatar_1 = require("../../../components/Catalog/CatalogAvatar");
function CatalogUserEntityCell({ name, email }) {
return (react_1.default.createElement(EntityTitleCellWrapper, { "data-component-name": "Catalog/CatalogTableView/CatalogUserEntityCell" },
react_1.default.createElement(CatalogAvatar_1.CatalogAvatar, { value: name, size: "medium" }),
react_1.default.createElement(EntityTitleContent, null,
react_1.default.createElement(EntityTitle, null,
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, name)),
react_1.default.createElement(exports.Email, null,
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, email)))));
}
const EntityTitleCellWrapper = styled_components_1.default.div `
display: flex;
align-items: center;
gap: 6px;
max-width: 100%;
`;
const EntityTitleContent = styled_components_1.default.div `
display: flex;
flex-direction: column;
overflow: hidden;
`;
const EntityTitle = styled_components_1.default.div `
font-size: var(--catalog-table-entity-title-font-size);
line-height: var(--catalog-table-entity-title-line-height);
font-weight: var(--catalog-table-entity-title-font-weight);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
`;
exports.Email = styled_components_1.default.div `
font-size: var(--catalog-table-entity-summary-font-size);
line-height: var(--catalog-table-entity-summary-line-height);
color: var(--color-blue-6);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
`;
//# sourceMappingURL=CatalogUserEntityCell.js.map