@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
18 lines (17 loc) • 766 B
TypeScript
import type { JSX } from 'preact';
import type { PresentationalProps } from '../../types';
import type { IconComponent } from '../../types';
type ComponentProps = {
icon?: IconComponent;
status?: 'notice' | 'error' | 'success';
size?: 'sm' | 'md' | 'lg' | 'custom';
variant?: 'outlined' | 'raised' | 'custom';
unstyled?: boolean;
};
type HTMLAttributes = Omit<JSX.HTMLAttributes<HTMLElement>, 'size' | 'icon'>;
export type CalloutProps = PresentationalProps & ComponentProps & HTMLAttributes;
/**
* Render a banner-like alert message with corresponding icon and coloring
*/
export default function Callout({ children, classes, elementRef, icon: Icon, status, size, variant, unstyled, ...htmlAttributes }: CalloutProps): JSX.Element;
export {};