Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akshays-repo/mui-react-dialog-alert


https://github.com/akshays-repo/mui-react-dialog-alert

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# mui-react-alert

An Better way to call mui alert dialog

## Installation

Install mui-react-alert with npm

```bash
npm i mui-react-alert
```

## Demo

## Usage/Examples

App.tsx

```javascript
import { AlertDialog } from "mui-react-alert";

function App() {
return (




);
}

export default App;

```

Button.tsx

```javascript
import { showAlertConfirmarion } from "mui-react-alert";

function Button() {
return (
{
showAlertConfirmarion({
title: "Use Google's location service?",
cancelLabel: "DISAGREE",
confirmLabel: "AGREE",
subtitle:
"Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.",
onConfirmation: function (): void {
alert("Say hello");
},
});
}}
>
Show alert dialog

);
}

export default Button;

```

## Contributing

Contributions are always welcome!

## Support

For support, email [email protected]