import * as React from 'react'; import { TPAComponentProps } from '../../types'; export type ReactionType = 'angry' | 'clap' | 'heart' | 'lol' | 'sad' | 'smiley' | 'surprised' | 'thinking' | 'thumbsup' | 'thumbsdown'; export type DefaultReaction = Extract; export interface ReactionsHandle { closePopover(): void; openPopover(shouldFocus: boolean): void; } export interface ReactionsProps extends TPAComponentProps { onReactionSelect(id: string | null): void; /** * The default reaction to be used */ defaultReaction: DefaultReaction; /** * Reactions which will be rendered as available reactions in popover, in addition to the default reaction. */ additionalReactions: ReactionType[]; /** * The aria-label to be added to the popover's trigger button */ popoverTriggerAriaLabel: string; /** * A render function to render the reaction's label * The function receives the reaction's id as an argument */ reactionLabel(id: ReactionType): string; /** * A render function to render the reaction's label * The function receives the reaction's id as an argument */ reactionIcon(id: ReactionType): React.ReactElement; /** * The id of the selected reaction */ selectedId?: ReactionType; /** * Select between a light or dark theme * @default 'light' */ theme?: 'light' | 'dark'; } export type ReactionsTriggerState = 'INITIAL' | 'EXTENDED'; export interface ReactionListRef { focus(): void; ref?: HTMLDivElement; } export interface ReactionButtonRef { cancelPopover(): void; focus(): void; } export interface ReactionDefinition { id: ReactionType; icon: React.ReactElement; label: string; } export interface ReactionListProps extends TPAComponentProps { onSelect(id: string): void; items: ReactionDefinition[]; selectedId?: ReactionType; } export interface ReactionButtonProps extends TPAComponentProps { selectedReaction: ReactionDefinition; active: boolean; mobile: boolean; expanded: boolean; popoverTriggerAriaLabel: string; onTriggerReaction(): void; onTriggerPopover(): void; } //# sourceMappingURL=types.d.ts.map