@redocly/theme 0.45.3 → 0.45.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ const Tag_1 = require("../../components/Tag/Tag");
37
37
  const CatalogHighlight_1 = require("../../components/Catalog/CatalogHighlight");
38
38
  const Button_1 = require("../../components/Button/Button");
39
39
  function CatalogCard({ item }) {
40
- var _a;
40
+ var _a, _b;
41
41
  const { useTelemetry } = (0, hooks_1.useThemeHooks)();
42
42
  const telemetry = useTelemetry();
43
43
  return (React.createElement(Link_1.Link, { key: item.docsLink || item.link, to: item.docsLink || item.link },
@@ -47,7 +47,7 @@ function CatalogCard({ item }) {
47
47
  React.createElement(CardTitle, null,
48
48
  React.createElement(CatalogHighlight_1.CatalogHighlight, null, item.title))),
49
49
  React.createElement(CardDescription, null,
50
- React.createElement(CatalogHighlight_1.CatalogHighlight, null, (_a = item.description) !== null && _a !== void 0 ? _a : ''))),
50
+ React.createElement(CatalogHighlight_1.CatalogHighlight, null, (_b = (_a = item.summary) !== null && _a !== void 0 ? _a : item.description) !== null && _b !== void 0 ? _b : ''))),
51
51
  React.createElement(CardFooter, null,
52
52
  React.createElement(CardTags, null,
53
53
  (item.tags || []).map((tag, index) => (React.createElement(CardTag, { key: tag + index, color: (0, utils_1.slug)(tag) },
@@ -28,6 +28,7 @@ export type ResolvedFilter = Omit<CatalogFilterConfig, 'options'> & {
28
28
  export type CatalogItem = {
29
29
  title: string;
30
30
  link: string;
31
+ summary?: string;
31
32
  description?: string;
32
33
  image?: string;
33
34
  docsLink?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.45.3",
3
+ "version": "0.45.4",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -31,7 +31,7 @@ export function CatalogCard({ item }: CatalogCardProps): JSX.Element {
31
31
  </CardTitle>
32
32
  </CardTitleWrapper>
33
33
  <CardDescription>
34
- <CatalogHighlight>{item.description ?? ''}</CatalogHighlight>
34
+ <CatalogHighlight>{item.summary ?? item.description ?? ''}</CatalogHighlight>
35
35
  </CardDescription>
36
36
  </CardContent>
37
37
  <CardFooter>
@@ -25,6 +25,7 @@ export type ResolvedFilter = Omit<CatalogFilterConfig, 'options'> & {
25
25
  export type CatalogItem = {
26
26
  title: string;
27
27
  link: string;
28
+ summary?: string;
28
29
  description?: string;
29
30
  image?: string;
30
31
  docsLink?: string;