@redocly/theme
Version:
Shared UI components lib
28 lines (26 loc) • 1.29 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatalogCardView = CatalogCardView;
const react_1 = __importDefault(require("react"));
const styled_components_1 = __importDefault(require("styled-components"));
const utils_1 = require("../../../core/utils");
const CatalogCard_1 = require("../../../components/Catalog/CatalogCardView/CatalogCard");
function CatalogCardView({ entities, catalogConfig }) {
return (react_1.default.createElement(CatalogCardsWrapper, { "data-component-name": "Catalog/CatalogCardView/CatalogCardView" }, entities.map((entity) => (react_1.default.createElement(CatalogCard_1.CatalogCard, { key: entity.id, entity: entity, catalogConfig: catalogConfig })))));
}
const CatalogCardsWrapper = styled_components_1.default.div `
display: grid;
gap: var(--catalog-cards-group-gap);
margin-bottom: var(--spacing-xl);
overflow-x: auto;
@media screen and (min-width: ${utils_1.breakpoints.small}) {
grid-template-columns: repeat(2, 1fr);
}
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
margin-top: 0;
}
`;
//# sourceMappingURL=CatalogCardView.js.map