import React from 'react'; import styled from 'styled-components'; import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight'; import { CatalogEntityTypeIcon } from '@redocly/theme/components/Catalog/CatalogEntityTypeIcon'; import { BffCatalogEntity } from '@redocly/theme/core/types'; type Entity = Pick; export type CatalogEntityCellProps = { entity: T; }; export function CatalogEntityCell({ entity }: CatalogEntityCellProps) { return ( {entity.title} {entity.summary && ( {entity.summary} )} ); } const EntityTitleCellWrapper = styled.div` display: flex; align-items: center; gap: var(--catalog-table-title-cell-gap); max-width: 100%; `; const EntityTitleContent = styled.div` display: flex; flex-direction: column; max-width: calc( 100% - var(--catalog-table-entity-title-content-offset) ); /* Account for icon width (32px) + gap (8px) */ overflow: hidden; `; const EntityTitle = styled.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; `; const EntitySummary = styled.div` font-size: var(--catalog-table-entity-summary-font-size); line-height: var(--catalog-table-entity-summary-line-height); color: var(--catalog-table-description-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; `;