import type { ReactNode } from 'react'; import type { Heading } from '../common'; import type { CardContainerProps } from '../CardContainer'; import type { LinkProps } from '../Link'; import type { CardWidgetActionButton } from './CardWidgetAction'; /** * Props passed to the [Link](https://storybook.wise.design/?path=/docs/typography-link--docs) * that the title is rendered as. A trailing chevron is rendered automatically, so do not put one * in `title`. */ export type CardWidgetTitleAction = Pick; export interface CardWidgetHeader { /** The widget's title. */ title: ReactNode; /** * Heading element rendered for the title. * @default 'h3' */ as?: Heading; /** * Makes the title a link with a trailing chevron. * @default undefined */ titleAction?: CardWidgetTitleAction; /** * A `CardWidgetActionButton` object (with a `label` or an `icon`) renders a small button, * anchored to the inline end. Any other node is rendered as given. * @default undefined */ action?: CardWidgetActionButton | ReactNode; /** * Second action, at a lower emphasis, rendered before `action`. Two is the maximum, to keep * the title legible. Takes the same values as `action`, and keeps its lower emphasis when used * on its own. * @default undefined */ actionSecondary?: CardWidgetActionButton | ReactNode; } /** * The widget always has the card's default padding, so its header and content line up, and its * states always follow its title link. */ export interface CardWidgetProps extends Omit { /** * The widget's header: a title, optionally a link, and up to two actions. * @default undefined */ header?: CardWidgetHeader; /** * The widget's content, rendered under the header. Children are stacked in a flex column that * fills the rest of the card's height, so `margin-top: auto` on the last child pushes it to the * bottom of the card. * @default undefined */ children?: ReactNode; } //# sourceMappingURL=CardWidget.types.d.ts.map