1.0.3 • Published 1 year ago

alex-custom-modal v1.0.3

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

React Components by Alexprr

This repository was created to validate OpenClassrooms 14th project.

Getting Started

Install this package:

npm add alex-custom-modal

Import the Modal component:

import { Modal } from "alex-custom-modal";

Example :

This is a example of the Modal component implementation.

The Modal component can be rendered like any other React component in JSX.

const ModalContainer = ({ onClose }) => {
	return <Modal onClose={onClose} link="target" />;
};

The Modal component needs two props : onClose and link.

The onClose prop is a callback function that is called when you click on the close icon The link prop is a string value that fills the href attribute of the tag inside the Modal. This is used for redirection.

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

0.1.0

1 year ago