@jdl2/dialog

A dialog based on `react-modal`. You may define more than one modal at any given time.

Stats

StarsIssuesVersionUpdatedCreatedSize
@jdl2/dialog
2.0.0-alpha.303 years ago4 years agoMinified + gzip package size for @jdl2/dialog in KB

Readme

Dialog

A dialog based on react-modal. You may define more than one modal at any given time.

addDialog(title: string, className: string, children: JSX.Element, onDismiss?: () => void)

const title = 'My Dialog'
const additionalClass = 'outline'
const content = <span>Some modal content</span>
const onDismiss = jest.fn()

// Add dialog(s). Note, additional dialogs will appear above previous.
dialogs.addDialog(title, additionalClass, content, onDismiss);
dialogs.addDialog(title, additionalClass, content, onDismiss);
setTimeout(() => {
    dialogs.addDialog(title, additionalClass, content, onDismiss); // 3rd on top of stack
}, 5000);
dialogs.render();

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.