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.
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 !
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-drops
and addRNDrops.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNDrops.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
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",
},
});
This is simply a React Native wrapper around Drops:
- Drops 💧 - omaralbeik