Dialog modal message
A simple customizable react dialog dialog with message in typescript.
From project 14 OpenClassrooms, react app developer
Installation
npm install @stephane1920/ts-dialog-react
or
yarn add @stephane1920/ts-dialog-react
Usage
import React from 'react';
import ReactDOM from 'react-dom/client';
import Dialog from '@stephane1920/ts-dialog-react';
const SomeComponent = () => {
return (
<div>
<Dialog text="message de bienvenue" showDialog={true} />
</div>
)
};
Props
Label | Type | Required | Default |
---|---|---|---|
text | string | yes | N/A |
showDialog | boolean | no | false |
duration | number | no | 500 |
className | string | no | N/A |
onClose | function | no | N/A |
License
ISC