Skip to content

Commit 27601d7

Browse files
authored
Update README.md
1 parent b8af456 commit 27601d7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)