1.0.0 • Published 1 year ago

@fredabila/custom-alerts v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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;
1.0.0

1 year ago