Skip to content

Commit

Permalink
fix(react-notifications): remove readonly marker
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsdaniels committed Feb 28, 2024
1 parent 0361bc6 commit 3fa49d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-turtles-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@codedazur/react-notifications": patch
---

Remove redundant readonly marker from props.
16 changes: 8 additions & 8 deletions packages/react-notifications/providers/NotificationsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<{
Expand All @@ -17,17 +17,17 @@ export type Notifications = Record<string, NotificationGroup>;
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 = () => {
Expand Down

0 comments on commit 3fa49d9

Please sign in to comment.