Gathering detailed insights and metrics for @adityakmr7/react-native-toastify
Gathering detailed insights and metrics for @adityakmr7/react-native-toastify
npm install @adityakmr7/react-native-toastify
Typescript
Module System
Min. Node Version
Node Version
NPM Version
40.4
Supply Chain
55.4
Quality
66.3
Maintenance
50
Vulnerability
94.1
License
TypeScript (78.47%)
JavaScript (21.53%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,541
Last Day
9
Last Week
11
Last Month
13
Last Year
311
MIT License
39 Commits
2 Watchers
9 Branches
1 Contributors
Updated on Mar 20, 2023
Minified
Minified + Gzipped
Latest Version
1.0.2
Package Id
@adityakmr7/react-native-toastify@1.0.2
Unpacked Size
52.00 kB
Size
12.89 kB
File Count
59
NPM Version
10.2.4
Node Version
21.6.2
Published on
Mar 06, 2024
Cumulative downloads
Total Downloads
Last Day
0%
9
Compared to previous day
Last Week
0%
11
Compared to previous week
Last Month
-68.3%
13
Compared to previous month
Last Year
-74.7%
311
Compared to previous year
2
20
create custom toast
1npm i @adityakmr7/react-native-toastify
1import { ToastProvider } from 'react-native-toastify'; 2 3export default function App() { 4 return ( 5 <ToastProvider ToastComponent={CustomToastComponent} theme={customTheme}> 6 // Your App Component 7 </ToastProvider> 8 ); 9} 10
1 2 3import { useToastify } from 'react-native-toastify'; 4 5const ToastComponent = () => { 6 const { Toast } = useToastify(); 7 8 const handleToast = () => { 9 Toast.showToast({ message: 'Hello world', duration: 3000, type: "default" }); 10 }; 11 12 return ( 13 <View> 14 <TouchableOpacity onPress={handleToast}> 15 <View> 16 <Text>Click me to Show toast</Text> 17 </View> 18 </TouchableOpacity> 19 </View> 20 ); 21}; 22 23export default ToastComponent; 24
1const handleShowToast = () => {
2 Toast.showToast({ message: 'Hello world', duration: 3000, type: "default" });
3}
ToastComponent : React.Element
Toast Component custom style support.
theme?: ToastThemeProps
Pass your toast theme configuration. Default Theme Configuration is below.
Example:
export const theme: any = {
error: {
primary: '#000000',
secondary: '#fff',
},
success: {
primary: '#2e7d32',
secondary: '#fff',
},
warning: {
primary: '#ff9800',
secondary: '#fff',
},
default: {
primary: '#000000',
secondary: '#fff',
},
};
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
No vulnerabilities found.
No security vulnerabilities found.