11import React from 'react' ;
22import notification from 'helpers/notification' ;
33import { store } from 'rc-notifications/react-notification-component' ;
4- import { getContainer , getType , getMessage } from " helpers/randomize" ;
4+ import { getContainer , getType , getMessage } from ' helpers/randomize' ;
55
66function AnimationInExample ( ) {
7- const add = ( htmlClasses ) => {
7+ const add = htmlClasses => {
88 const type = getType ( ) ;
99
10- return store . addNotification ( Object . assign ( { } , notification , {
11- animationIn : htmlClasses ,
12- container : getContainer ( ) ,
13- message : getMessage ( type ) ,
14- type
15- } ) ) ;
10+ return store . addNotification (
11+ Object . assign ( { } , notification , {
12+ animationIn : htmlClasses ,
13+ container : getContainer ( ) ,
14+ message : getMessage ( type ) ,
15+ type
16+ } )
17+ ) ;
1618 } ;
1719
1820 return (
1921 < div className = "row" >
2022 < div className = "col-lg-6 offset-lg-3 column col-md-10 offset-md-1 col-sm-12" >
2123 < h6 > Animation Entrance</ h6 >
22- < div > Entrance < code className = "white-code" > animation</ code > can be customised by specifying CSS classes</ div >
2324 < div >
24- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated bounceIn" ] ) } >
25+ Entrance < code className = "white-code" > animation</ code > can be customised by specifying CSS
26+ classes
27+ </ div >
28+ < div >
29+ < button
30+ type = "button"
31+ className = "btn btn-outline-secondary"
32+ onClick = { ( ) => add ( [ 'animated bounceIn' ] ) }
33+ >
2534 Bounce In
26- </ button > { " " }
27- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated fadeIn" ] ) } >
35+ </ button > { ' ' }
36+ < button
37+ type = "button"
38+ className = "btn btn-outline-secondary"
39+ onClick = { ( ) => add ( [ 'animated fadeIn' ] ) }
40+ >
2841 Fade In
29- </ button > { " " }
30- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated flipInX" ] ) } >
42+ </ button > { ' ' }
43+ < button
44+ type = "button"
45+ className = "btn btn-outline-secondary"
46+ onClick = { ( ) => add ( [ 'animated flipInX' ] ) }
47+ >
3148 Flip In X
32- </ button > { " " }
33- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated flipInY" ] ) } >
49+ </ button > { ' ' }
50+ < button
51+ type = "button"
52+ className = "btn btn-outline-secondary"
53+ onClick = { ( ) => add ( [ 'animated flipInY' ] ) }
54+ >
3455 Flip In Y
35- </ button > { " " }
36- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated zoomIn" ] ) } >
56+ </ button > { ' ' }
57+ < button
58+ type = "button"
59+ className = "btn btn-outline-secondary"
60+ onClick = { ( ) => add ( [ 'animated zoomIn' ] ) }
61+ >
3762 Zoom In
38- </ button > { " " }
39- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated flash" ] ) } >
63+ </ button > { ' ' }
64+ < button
65+ type = "button"
66+ className = "btn btn-outline-secondary"
67+ onClick = { ( ) => add ( [ 'animated flash' ] ) }
68+ >
4069 Flash
41- </ button > { " " }
42- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated jackInTheBox" ] ) } >
70+ </ button > { ' ' }
71+ < button
72+ type = "button"
73+ className = "btn btn-outline-secondary"
74+ onClick = { ( ) => add ( [ 'animated jackInTheBox' ] ) }
75+ >
4376 Jack In The Box
4477 </ button >
4578 </ div >
@@ -49,39 +82,64 @@ function AnimationInExample() {
4982}
5083
5184function AnimationOutExample ( ) {
52- const add = ( htmlClasses ) => {
85+ const add = htmlClasses => {
5386 const type = getType ( ) ;
5487
55- return store . addNotification ( Object . assign ( { } , notification , {
56- slidingExit : { delay : 300 } ,
57- animationOut : htmlClasses ,
58- container : getContainer ( ) ,
59- message : getMessage ( type ) ,
60- type
61- } ) ) ;
88+ return store . addNotification (
89+ Object . assign ( { } , notification , {
90+ slidingExit : { delay : 300 } ,
91+ animationOut : htmlClasses ,
92+ container : getContainer ( ) ,
93+ message : getMessage ( type ) ,
94+ type
95+ } )
96+ ) ;
6297 } ;
6398
6499 return (
65100 < div className = "row" >
66101 < div className = "col-lg-6 offset-lg-3 column col-md-10 offset-md-1 col-sm-12" >
67102 < h6 > Animation Exit</ h6 >
68- < div > Exit < code className = "white-code" > animation</ code > can be customised by specifying CSS classes</ div >
69103 < div >
70- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated bounceOut" ] ) } >
104+ Exit < code className = "white-code" > animation</ code > can be customised by specifying CSS
105+ classes
106+ </ div >
107+ < div >
108+ < button
109+ type = "button"
110+ className = "btn btn-outline-secondary"
111+ onClick = { ( ) => add ( [ 'animated bounceOut' ] ) }
112+ >
71113 Bounce Out
72- </ button > { " " }
73- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated fadeOut" ] ) } >
114+ </ button > { ' ' }
115+ < button
116+ type = "button"
117+ className = "btn btn-outline-secondary"
118+ onClick = { ( ) => add ( [ 'animated fadeOut' ] ) }
119+ >
74120 Fade Out
75- </ button > { " " }
76- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated flipOutX" ] ) } >
121+ </ button > { ' ' }
122+ < button
123+ type = "button"
124+ className = "btn btn-outline-secondary"
125+ onClick = { ( ) => add ( [ 'animated flipOutX' ] ) }
126+ >
77127 Flip Out X
78- </ button > { " " }
79- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated flipOutY" ] ) } >
128+ </ button > { ' ' }
129+ < button
130+ type = "button"
131+ className = "btn btn-outline-secondary"
132+ onClick = { ( ) => add ( [ 'animated flipOutY' ] ) }
133+ >
80134 Flip Out Y
81- </ button > { " " }
82- < button type = "button" className = "btn btn-outline-secondary" onClick = { ( ) => add ( [ "animated zoomOut" ] ) } >
135+ </ button > { ' ' }
136+ < button
137+ type = "button"
138+ className = "btn btn-outline-secondary"
139+ onClick = { ( ) => add ( [ 'animated zoomOut' ] ) }
140+ >
83141 Zoom Out
84- </ button > { " " }
142+ </ button > { ' ' }
85143 </ div >
86144 </ div >
87145 </ div >
@@ -95,4 +153,4 @@ export default function AnimationWrapper() {
95153 < AnimationOutExample />
96154 </ div >
97155 ) ;
98- }
156+ }
0 commit comments