@mackscript/rn-log-alert
v1.0.0
Published
rn-log-alert React Native is a lightweight React Native utility that allows developers to display custom alerts with a message and background color.
Downloads
2
Readme
import React from 'react';
import { View, Button, Alert, StyleSheet } from 'react-native';
import LogAlert from 'log-react-native';
const App = () => {
const showCustomAlert = () => {
LogAlert.show('This is a custom alert!', '#ff5733', '#ffffff');
};
return (
<View style={styles.container}>
<Button title="Show Alert" onPress={showCustomAlert} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#f5f5f5',
},
});
export default App;