@fredabila/custom-alerts
v1.0.0
Published
Custom alerts for Expo React Native applications
Downloads
2
Readme
Custom Alerts for Expo React Native
A custom alert component for Expo React Native applications. This component allows you to create custom-styled alerts easily.
Installation
npm install @fredabila/custom-alerts
import React, { useState } from 'react';
import { View, Button } from 'react-native';
import CustomAlert from 'custom-alerts';
const App = () => {
const [isVisible, setIsVisible] = useState(false);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Show Alert" onPress={() => setIsVisible(true)} />
<CustomAlert
isVisible={isVisible}
message="Hello, World!"
onClose={() => setIsVisible(false)}
/>
</View>
);
};
export default App;