DEV Community

Akash Yadav
Akash Yadav

Posted on

react-native-haptic-feedback

import { trigger } from "react-native-haptic-feedback";

const FeedbackType = {
    ImpactLight: 'impactLight',
    ImpactMedium: 'impactMedium',
    ImpactHeavy: 'impactHeavy',

    Rigid: 'rigid',
    Soft: 'soft',

    NotificationSuccess: 'notificationSuccess',
    NotificationWarning: 'notificationWarning',
    NotificationError: 'notificationError',
}

class Pandora {
    static get FeedbackType() {
        return FeedbackType;
    }

    static TriggerFeedback(feedbackType = FeedbackType.ImpactMedium) {
        trigger(feedbackType);
    }
}

export default Pandora;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay