UNPKG

@hex2r/react-announcer

Version:

Accessible announcer component for React apps using the Context API. Renders live-region messages for screen readers and provides a simple hook for dispatching announcements from anywhere in your component tree.

13 lines 339 B
export type AnnouncerEvent = { message: string; assertive?: boolean; }; export type PropsWithId = { id: string; }; export type Announcement = PropsWithId & AnnouncerEvent; export type AnnounceFn = (e: AnnouncerEvent) => void; export type AnnouncerContextType = { announce: AnnounceFn; }; //# sourceMappingURL=types.d.ts.map