File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
[ ![ forthebadge] ( https://forthebadge.com/images/badges/made-with-javascript.svg )] ( https://forthebadge.com )
9
9
10
+ ### DEMO
11
+
12
+ * [ React-Alerts] ( http://divyanshurawat.me/react-alerts/ )
13
+
10
14
11
15
### Installation:
12
16
@@ -24,6 +28,14 @@ First you have to wrap your app with the Provider giving it the alert template a
24
28
import React , { Component } from ' react'
25
29
import { render } from ' react-dom'
26
30
import Alert from ' react-alerts-component'
31
+
32
+ const options = {
33
+ margin: ' 10' ,
34
+ width : " 500" ,
35
+ fontColor : ' black' ,
36
+ backgroundColor : ' grey'
37
+ }
38
+
27
39
28
40
class App extends Component {
29
41
render () {
@@ -36,3 +48,37 @@ First you have to wrap your app with the Provider giving it the alert template a
36
48
render (< App / > , document .getElementById (' root' ))
37
49
38
50
```
51
+
52
+
53
+ ## Options
54
+ You can pass the following options as props to ``` <Alert /> ``` :
55
+
56
+ ``` js
57
+
58
+
59
+ const options = {
60
+ type: String ,
61
+ message: String ,
62
+ margin: String ,
63
+ width : String ,
64
+ fontColor : String ' ,
65
+ backgroundColor : String
66
+ }
67
+
68
+ ```
69
+
70
+ Values that ``` type ``` can take are as follows:
71
+
72
+ * default
73
+ * danger
74
+ * warning
75
+ * secondary
76
+ * info
77
+ * success
78
+ * light
79
+ * custom
80
+
81
+
82
+ 
83
+
84
+
You can’t perform that action at this time.
0 commit comments