npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-modal-reanimated

v1.1.1

Published

React Native Modal with Reanimated

Downloads

10

Readme

This is a custom modal with reanimated. My build versions: 1- react-native-reanimated: 2.14.4

Installation

  npm install react-native-modal-reanimated

Doc

react-native-reanimated

Usage

    import React, { useState } from "react";
    import { SafeAreaView, Button } from "react-native";
    import Modal from "react-native-modal-reanimated";

    const [isOpen, setIsOpen] = useState(false);

    const handleClose = () => {
        setIsOpen(false);
    };

    const handleOpen = () => {
        setIsOpen(true);
    };

    const okButtonOnPress = () => {
        console.log("ok button pressed!");
        setIsOpen(false);
    };

    const noButtonOnPress = () => {
        console.log("no button pressed!");
        setIsOpen(false);
    };

    const yesButtonOnPress = () => {
        console.log("yes button pressed!");
        setIsOpen(false);
    };

    <SafeAreaView style={{ flex: 1 }}>
        <Button title="Open Modal" onPress={handleOpen} />

        <Modal
            isOpen={isOpen}
            onPress={handleClose}
            from="top"
            damping={true}
            duration={300}
            type="success" // success - info - warning - error
            title="Modal Title!"
            text="Modal Text."
            okButtonText={"Ok"}
            noButtonText={"No"}
            yesButtonText={"Yes"}
            openModalBgColor="gray"
            backgroundOpacity={0.5}
            twoButton={true}
            width="80%"
            height="35%"
            //containerBgColor="#DEF1D7" Automatically gives its own color for each type
            //containerBorderColor="#1F8722" Automatically gives its own color for each type
            containerBorderWidth={1}
            containerBorderRadius={15}
            containerPadding={10}
            containerIconSize={80}
            okButtonBgColor={"gray"}
            noButtonBgColor={"gray"}
            yesButtonBgColor={"gray"}
            buttonMinWidth={"30%"}
            buttonHeight={35}
            buttonBorderRadius={10}
            titleColor={"black"}
            titleSize={15}
            textColor={"black"}
            textSize={13}
            buttonTextColor={"white"}
            buttonTextSize={14}
            buttonTextBold={true}
            okButtonOnPress={okButtonOnPress}
            noButtonOnPress={noButtonOnPress}
            yesButtonOnPress={yesButtonOnPress}
        />
    </SafeAreaView>;

API

| prop | type | description | default | | :---------------------- | :-------- | :------------------------ | :-------- | | isOpen | Boolean | Modal show. | false | | onPress | Func | Modal close onPress. | null | | from | String | Modal from. | "top" | | damping | Boolean | Modal damping. | true | | duration | Number | Modal duration. | 300 | | type | String | Modal type. | "success" | | title | String | Modal title. | "Non" | | text | String | Modal text. | "Non" | | okButtonText | String | Modal okButtonText. | "Non" | | noButtonText | String | Modal noButtonText. | "Non" | | yesButtonText | String | Modal yesButtonText. | "Non" | | openModalBgColor | String | Modal bg color | "gray" | | backgroundOpacity | Number | Modal background opacity. | 0.5 | | twoButton | Boolean | Modal one or two button. | true | | width | String | Modal width. | "80%" | | height | String | Modal height. | "35%" | | containerBgColor | String | Modal bg color. | "#DEF1D7" | | containerBorderColor | String | Modal border color. | "#1F8722" | | containerBorderWidth | Number | Modal border width. | 1 | | containerBorderRadius | Number | Modal border radius. | 15 | | containerPadding | Number | Modal padding. | 10 | | containerIconSize | Number | Modal icon size. | 80 | | okButtonBgColor | String | Modal btn bg color. | "gray" | | noButtonBgColor | String | Modal btn bg color. | "gray" | | yesButtonBgColor | String | Modal btn bg color. | "gray" | | buttonMinWidth | String | Modal btn min width. | "30%" | | buttonHeight | Number | Modal btn height. | 35 | | buttonBorderRadius | Number | Modal btn border radius. | 10 | | titleColor | String | Modal title color. | "black" | | titleSize | Number | Modal title size. | 15 | | textColor | String | Modal text color. | "black" | | textSize | Number | Modal text size. | 13 | | buttonTextColor | String | Modal text color. | "white" | | buttonTextSize | Number | Modal text size. | 14 | | buttonTextBold | Boolean | Modal text bold. | true | | okButtonOnPress | Func | Modal ok btn onPress. | null | | noButtonOnPress | Func | Modal no btn onPress. | null | | yesButtonOnPress | Func | Modal yes btn onPress. | null |