import { ElementType, FC } from 'react'; import { ButtonProps, ComponentWithAs, TextProps, ThemingProps } from '@chakra-ui/react'; export interface TileProps extends Omit { /** * The icon that should be displayed on the tile */ icon?: ElementType; /** * The components to be displayed * Refer here for correct typing: https://stackoverflow.com/questions/53688899/typescript-and-react-children-type */ children: React.ReactNode; /** * The badge, if any, to be displayed alongside the title */ badge?: JSX.Element; /** * The variant of the tile - whether it is complex (many elements) or simple (title and subtitle only). */ variant?: ThemingProps<'Tile'>['variant']; /** * Whether the tile is selected or not */ isSelected?: boolean; } type TileWithParts = ComponentWithAs<'button', TileProps> & { Subtitle: typeof TileSubtitle; Title: typeof TileTitle; Text: typeof TileText; }; export declare const Tile: TileWithParts; declare const TileTitle: FC; declare const TileSubtitle: FC; declare const TileText: FC; export {};