UNPKG

mt-flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

38 lines (37 loc) 1.21 kB
import type { ComponentProps, FC, PropsWithChildren } from 'react'; import type { DeepPartial, FlowbiteBoolean } from '../../'; export interface FlowbiteCardTheme { root: FlowbiteCardRootTheme; img: FlowbiteCardImageTheme; } export interface FlowbiteCardRootTheme { base: string; children: string; horizontal: FlowbiteBoolean; href: string; } export interface FlowbiteCardImageTheme { base: string; horizontal: FlowbiteBoolean; } interface CommonCardProps extends PropsWithChildren<ComponentProps<'div'>> { horizontal?: boolean; href?: string; /** Overwrites the theme. Will be merged with the context theme. * @default {} */ theme?: DeepPartial<FlowbiteCardTheme>; } export type CardProps = (({ imgAlt?: string; imgSrc?: string; renderImage?: never; } | { /** Allows to provide a custom render function for the image component. Useful in Next.JS and Gatsby. **Setting this will disable `imgSrc` and `imgAlt`**. */ renderImage?: (theme: DeepPartial<FlowbiteCardTheme>, horizontal: boolean) => JSX.Element; imgAlt?: never; imgSrc?: never; }) & CommonCardProps); export declare const Card: FC<CardProps>; export {};