@mackscript/rn-log-alert

1.0.0 • Public • Published
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;

Readme

Keywords

none

Package Sidebar

Install

npm i @mackscript/rn-log-alert

Weekly Downloads

6

Version

1.0.0

License

ISC

Unpacked Size

1.89 kB

Total Files

4

Last publish

Collaborators

  • mackscript