File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,35 @@ CustomNotification({
133133| ` color ` | Text color|
134134| ` ZeroTime ` | Time at which zero comes|
135135
136+ ### Event Handling
137+
138+ ``` javascript
139+ import { onEvent } from " react-native-custom-timer-notification" ;
140+
141+ // Listen for notification interactions (press/cancel)
142+ onEvent (event => {
143+ const { action , payload } = event ;
144+
145+ switch (action) {
146+ case ' press' :
147+ // Handle notification press/click
148+ console .log (' Notification pressed:' , payload);
149+ break ;
150+ case ' cancel' :
151+ // Handle notification dismissal
152+ console .log (' Notification cancelled:' , payload);
153+ break ;
154+ }
155+ });
156+
157+ ### Remove Notifications
158+
159+ ` ` ` javascript
160+ import { RemoveTimer } from "react-native-custom-timer-notification";
161+
162+ // Remove a specific notification by ID
163+ RemoveTimer(1);
164+ ` ` `
136165
137166## 🤝 Contributing
138167
You can’t perform that action at this time.
0 commit comments