UNPKG

@hawtio/react

Version:

A Hawtio reimplementation based on TypeScript + React.

68 lines (60 loc) 2.26 kB
import * as React from 'react'; import React__default from 'react'; import { P as Plugin } from '../core-BCevQFXU.js'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { ThProps } from '@patternfly/react-table'; import '@module-federation/utilities'; type HawtioProps = { basepath?: string; }; declare const Hawtio: React__default.FunctionComponent<HawtioProps>; declare function useIsDarkTheme(): boolean; type PageContext = { username: string; plugins: Plugin[]; }; /** * PageContext gives access to: * * login name of currently logged in user * * an array of plugins available in Hawtio - to be displayed in `<HawtioSidebar>` * * This context is _provided_ in top level `<HawtioPage>` component and provides read-only information * about current username and a list of loaded plugins. * The state is managed in `useUser` and `usePlugins` hooks. */ declare const PageContext: React.Context<PageContext>; declare const HawtioLoadingPage: React__default.FunctionComponent; interface Props<T> { extraToolbarLeft?: React__default.ReactNode; extraToolbarRight?: React__default.ReactNode; tableColumns: { name?: string; key?: keyof T; renderer?: (value: T) => React__default.ReactNode; isAction?: boolean; percentageWidth?: ThProps['width']; hideValues?: string[]; }[]; rows: T[]; fixedSearchCategories?: { key: keyof T; name: string; values: string[]; id?: string; ariaLabel?: string; renderer?: (value: string) => React__default.ReactNode; }[]; searchCategories: { name: string; key: keyof T; }[]; onClick?: (value: T) => void; onClearAllFilters?: () => void; highlightSearch?: boolean; classPrefix?: string; } declare function FilteredTable<T>({ extraToolbarLeft, extraToolbarRight, tableColumns, rows, fixedSearchCategories, searchCategories, onClick, onClearAllFilters, classPrefix, highlightSearch, }: Props<T>): react_jsx_runtime.JSX.Element; declare const ExpandableText: React.FunctionComponent<{ children: React.ReactNode; }>; export { ExpandableText, FilteredTable, Hawtio, HawtioLoadingPage, type HawtioProps, PageContext, useIsDarkTheme };