react-confirm 0.3.0-0 → 0.3.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,14 @@ react-confirm is a lightweight library that simplifies the implementation of con
|
|
|
3
3
|
|
|
4
4
|
One key feature of react-confirm is that it doesn't provide a specific view or component for the confirmation dialog, allowing you to easily customize the appearance of the dialog to match your application's design.
|
|
5
5
|
|
|
6
|
-
In the [example](https://github.com/haradakunihiko/react-confirm/tree/master/example), [react-bootstrap](https://react-bootstrap-v3.netlify.app/components/modal/) and [material-ui](http://www.material-ui.com/#/components/dialog) are used with.
|
|
7
|
-
|
|
8
6
|
[](https://badge.fury.io/js/react-confirm)
|
|
9
7
|
|
|
8
|
+
## Examples
|
|
9
|
+
- [react-bootstrap demo in codesandbox](https://codesandbox.io/s/react-confirm-with-react-bootstrap-kjju1)
|
|
10
|
+
- [chakra-ui(using context) demo in codesandbox](https://codesandbox.io/s/react-confirm-with-chakra-ui-oidpf1)
|
|
11
|
+
- [react-bootstrap example](https://github.com/haradakunihiko/react-confirm/tree/master/example/react-bootstrap)
|
|
12
|
+
- [material-ui example](https://github.com/haradakunihiko/react-confirm/tree/master/example/material-ui)
|
|
13
|
+
|
|
10
14
|
## Motivation
|
|
11
15
|
React is a powerful library that allows for reactive rendering based on component state. However, managing temporary states like confirmation dialogs can quickly become complex. The question is: is it worth implementing these states within your app? The answer is not always a clear yes.
|
|
12
16
|
|
|
@@ -138,6 +142,9 @@ To render the confirmation dialog within the React component tree but in a diffe
|
|
|
138
142
|
const mounter = createReactTreeMounter(document.body);
|
|
139
143
|
```
|
|
140
144
|
|
|
145
|
+
### example
|
|
146
|
+
Context example with Chakra-ui in [codesandbox](https://codesandbox.io/s/react-confirm-with-chakra-ui-oidpf1)
|
|
147
|
+
|
|
141
148
|
## typescript
|
|
142
149
|
|
|
143
150
|
Experimentally added full typescript declaration files at `typescript` branch.
|