diff --git a/.changeset/silent-turtles-yawn.md b/.changeset/silent-turtles-yawn.md new file mode 100644 index 00000000..dcbb36d2 --- /dev/null +++ b/.changeset/silent-turtles-yawn.md @@ -0,0 +1,5 @@ +--- +"@codedazur/react-notifications": patch +--- + +Remove redundant readonly marker from props. diff --git a/packages/react-notifications/providers/NotificationsContext.tsx b/packages/react-notifications/providers/NotificationsContext.tsx index db1966e5..e8b94810 100644 --- a/packages/react-notifications/providers/NotificationsContext.tsx +++ b/packages/react-notifications/providers/NotificationsContext.tsx @@ -2,9 +2,9 @@ import { Timer } from "@codedazur/essentials"; import { ReactNode, createContext } from "react"; export interface NotificationProps { - readonly onDismiss?: () => void; - readonly timer?: Timer; - readonly children?: ReactNode; + onDismiss?: () => void; + timer?: Timer; + children?: ReactNode; } export type NotificationGroup = Array<{ @@ -17,17 +17,17 @@ export type Notifications = Record; export type AutoDismiss = number | false; export interface NotificationsContext { - readonly entries: Notifications; - readonly queue: Notifications; - readonly add: ( + entries: Notifications; + queue: Notifications; + add: ( group: string, children: ReactNode, options?: { autoDismiss?: AutoDismiss; }, ) => NotificationProps; - readonly remove: (group: string, id: number) => void; - readonly clear: (group: string) => void; + remove: (group: string, id: number) => void; + clear: (group: string) => void; } const error = () => {