1.2.1 โ€ข Published 1 year ago

react-network-notifier v1.2.1

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

React Network Notifier ๐ŸŒ๐Ÿšซ

A fun and witty React component that displays humorous messages and images when the internet connection is lost, keeping your users entertained while they wait for the connection to return. This component works with both React and Next.js applications and supports Server-Side Rendering (SSR). npm GitHub Workflow Status npm bundle size React Network Notifier Example

Features

  • ๐ŸŽญ Randomly selects a funny message and image from a pool.
  • ๐ŸŽจ Easily customizable with custom messages, ascii art's and styles.
  • ๐Ÿ“ฑ Responsive design.
  • ๐Ÿš€ Supports SSR for Next.js applications.
  • ๐ŸŽฏ Lightweight and easy to integrate.

Installation

npm install react-network-notifier
#or 
yarn add react-network-notifier

Usage

Import the NetworkNotifier component and add it to your application:

import NetworkNotifier from 'react-network-notifier';

function App() {
  return (
    <div>
      <NetworkNotifier />
      {/* Your app components */}
    </div>
  );
}

export default App;

Custom Configuration

You can also provide custom messages, images, and styles to the NetworkNotifier component:

import NetworkNotifier from 'react-network-notifier';

const customMessages = [
  'Your custom message 1',
  'Your custom message 2',
  // Add more custom messages
];

const customImages = [
 `
  ( อกยฐ อœส– อกยฐ)
  `,
  
  // Add more custom images
];

const customStyles = {
  backgroundColor: '#fafafa',
  // Add more custom styles
};

function App() {
  return (
    <div>
      <NetworkNotifier messages={customMessages} images={customImages} styles={customStyles} />
      {/* Your app components */}
    </div>
  );
}

export default App;

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

MIT License. See LICENSE for more information.

Hire Me! ๐Ÿ’ผ

I'm available for freelance projects or full-time opportunities. If you like my work, feel free to reach out to me: