https://github.com/hlsxx/react-native-awesome-dialogs
React-native simple dialog windows
https://github.com/hlsxx/react-native-awesome-dialogs
List: react-native-awesome-dialogs
alert dialogs notifications popup-window react-native reactjs
Last synced: about 1 month ago
JSON representation
React-native simple dialog windows
- Host: GitHub
- URL: https://github.com/hlsxx/react-native-awesome-dialogs
- Owner: hlsxx
- License: mit
- Created: 2024-10-23T08:21:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-20T20:19:56.000Z (about 1 year ago)
- Last Synced: 2025-04-19T22:01:41.687Z (11 months ago)
- Topics: alert, dialogs, notifications, popup-window, react-native, reactjs
- Language: TypeScript
- Homepage:
- Size: 2.69 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# react-native-awesome-dialogs
## Installation
```sh
npm install react-native-awesome-dialogs
```
## Usage
```js
import { Dialog, DialogRoot } from 'react-native-awesome-dialogs';
Dialog.success({ title: "Successfully", text: "Successfully executed" })}
/>
```
### Custom options
```js
Dialog.success({
title: "Successfully",
text: "Successfully executed",
onHide: () => console.log("On hide"),
onShow: () => console.log("On show"),
titleStyle: {
color: '#5c9614'
},
style: {
borderRadius: 5,
borderWidth: 3,
borderStyle: 'dashed',
borderColor: '#5c9614'
},
button: {
text: "X",
style: {
alignSelf: 'center',
borderRadius: 5,
backgroundColor: 'gray',
width: 40,
}
}
});
```
### Params
```js
export interface DialogShowProps {
title?: string;
text?: string;
icon?: string;
color?: string;
titleStyle?: StyleProp,
textStyle?: StyleProp,
onShow?: () => void;
onHide?: () => void;
style?: StyleProp,
button?: {
style?: StyleProp,
textStyle?: StyleProp,
text?: string;
onPress?: () => void;
}
}
```
## License
MIT