-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathHaptics.nitro.ts
More file actions
26 lines (23 loc) · 928 Bytes
/
Haptics.nitro.ts
File metadata and controls
26 lines (23 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { type HybridObject } from 'react-native-nitro-modules';
/**
* The type of notification feedback generated by a UINotificationFeedbackGenerator object.
* [`UINotificationFeedbackType`](https://developer.apple.com/documentation/uikit/uinotificationfeedbacktype)
*/
export type NotificationFeedbackType = 'success' | 'warning' | 'error';
/**
* The mass of the objects in the collision simulated by a UIImpactFeedbackGenerator object
* [`UIImpactFeedbackStyle`](https://developer.apple.com/documentation/uikit/uiimpactfeedbackstyle)
*/
export type ImpactFeedbackStyle =
| 'light'
| 'medium'
| 'heavy'
| 'soft'
| 'rigid';
export interface Haptics
extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
impact(style: ImpactFeedbackStyle): void;
notification(type: NotificationFeedbackType): void;
selection(): void;
impactWithIntensity(style: ImpactFeedbackStyle, intensity: number): void;
}