@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
14 lines (13 loc) • 646 B
TypeScript
import type { ComponentChildren } from 'preact';
import type { ButtonProps } from './Button';
export type OptionButtonProps = {
/** Optional content to render at the right side of the button */
details?: ComponentChildren;
/** alias for `pressed`: this option button is selected **/
selected?: boolean;
} & Omit<ButtonProps, 'size' | 'unstyled' | 'classes' | 'variant'>;
/**
* Render a button representing one of a set of options, with optional
* right-aligned `details` content
*/
export default function OptionButton({ children, details, selected, pressed, ...buttonProps }: OptionButtonProps): import("preact").JSX.Element;