0.0.13 • Published 6 months ago

popup-i v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

popup-i

popup-i is a simple and lightweight React TypeScript library for rendering popup components. It has no external dependencies and provides an easy way to display popups using a declarative approach.

Installation

You can install popup-i via npm:

npm install popup-i

Usage

Below is an example of how to use popup-i in your React project:

import Popup, { PopupTrigger, PopupContent } from "popup-i";
import Test from "./Test"; // Your component to be displayed in the popup

function App() {
  return (
    <>
      <Popup>
        <PopupTrigger>Open Popup</PopupTrigger>
        <PopupContent className="" closeWhenClickOutside>
          <Test name="test" age={10} address="address" />
        </PopupContent>
      </Popup>
    </>
  );
}

export default App;

API Reference

Popup

The root component that manages the popup behavior.

Props

NameTypeRequiredDescription
childrenReact.ReactNodeThe content of the popup.

PopupTrigger

A button or element that triggers the popup when clicked.

Props

NameTypeRequiredDescription
childrenReact.ReactNodeThe trigger content.
classNamestringCustom class for styling.

PopupContent

The content container of the popup.

Props

NameTypeRequiredDescription
childrenReact.ReactNodeThe content to display inside the popup.
classNamestringCustom class for styling.
closeWhenClickOutsidebooleanCloses popup when clicking outside (default: true).
contentClassNamestringAdditional styling for the popup content.

License

This project is licensed under the MIT License.

Contributing

Feel free to open issues and submit pull requests for improvements and bug fixes.


Made with ❤️ by abdoseadaa

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.1

6 months ago

0.0.0

6 months ago