@redocly/theme
Version:
Shared UI components lib
29 lines (28 loc) • 944 B
TypeScript
import React, { ReactNode } from 'react';
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
export type BaseEntity = {
id: string;
key: string;
type: string;
title: string;
summary?: string | null;
revision?: string | null;
version?: string | null;
};
export type CatalogTableViewRowProps<T extends BaseEntity> = {
entity: T;
entitiesCatalogConfig?: EntitiesCatalogConfig;
catalogConfig: CatalogEntityConfig;
columns?: CatalogColumn<T>[];
onRowClick?: (entity: T) => void;
};
export type CatalogColumn<T> = {
key: string;
title: string;
render: (entity: T) => ReactNode;
width?: string;
minWidth?: string;
sortable?: boolean;
sortKey?: string;
};
export declare const CatalogTableViewRow: <T extends BaseEntity>({ entity, entitiesCatalogConfig, catalogConfig, columns, onRowClick, }: CatalogTableViewRowProps<T>) => React.JSX.Element;