8000 GitHub - gaauwe/react-native-drops: This is a React Native implementation of Drops; a framework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This is a React Native implementation of Drops; a framework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil

Notifications You must be signed in to change notification settings

gaauwe/react-native-drops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-drops (WIP)

This is a React Native implementation of Drops; a framework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil.

Generic badge

Getting started

npm install https://github.com/gaauwe/react-native-drops --save

or

yarn add https://github.com/gaauwe/react-native-drops

For now you need to manually add Drop to your applications Podfile

pod 'Drops', :git => 'https://github.com/omaralbeik/Drops.git', :tag => '1.6.0'

Don't forget to run cd ios && pod install && cd .. after that !

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-drops and add RNDrops.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNDrops.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

import React from "react";
import { Button, StyleSheet, View } from "react-native";
import Drop from "react-native-drops";

export default function App() {
  const showDrop = () => {
    Drop({
      title: "Subscribed",
      subtitle: `Subscribed for future updates`,
      icon: "heart.circle.fill",
    });
  };

  return (
    <View style={styles.container}>
      <Button title="Show Drop" onPress={showDrop} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
  },
});

Credits

This is simply a React Native wrapper around Drops:

About

This is a React Native implementation of Drops; a framework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0