Socket
Book a DemoInstallSign in
Socket

@volkenomakers/toast

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volkenomakers/toast

React native package for showing success and error message using react hooks

1.0.5
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

toast

Single select

Add it to your project

  • Using NPM npm install @volkenomakers/toast
  • or:
  • Using Yarn yarn add @volkenomakers/toast

Usage

import React from "react";
import { View } from "react-native";
import { Button } from "react-native";

import { useToast, ToastProvider } from "@volkenomakers/toast";

const ToastMessages = () => {
  const toast = useToast();
  return (
    <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
      <Button
        title="Show Sucess message"
        onPress={() => toast.success("this is an exemple of success message")}
      />
      <Button
        title="Show error message"
        onPress={() => toast.error("this is an exemple of error message")}
        containerStyle={{ marginVertical: 20 }}
      />
      <Button
        title="Show message with 10 seconds of duration"
        onPress={() =>
          toast.success(
            "this is an exemple of succes message with 10s of duration",
            10 * 1000
          )
        }
        containerStyle={{ marginVertical: 20 }}
      />
    </View>
  );
};

const ToastApp = () => {
  return (
    <ToastProvider position="top">
      <ToastMessages />
    </ToastProvider>
  );
};

export default ToastApp;

ISC Licensed

Keywords

react-native

FAQs

Package last updated on 30 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.