File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
src/components/animatedModal Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -139,20 +139,26 @@ const AnimatedModal = forwardRef(
139
139
) ;
140
140
}
141
141
142
+ function sketchSVG ( ) : React . ReactElement {
143
+ return (
144
+ < svg
145
+ id = "modal-sketch-svg"
146
+ xmlns = "http://www.w3.org/2000/svg"
147
+ width = "100%"
148
+ height = "100%"
149
+ preserveAspectRatio = "none" >
150
+ < rect x = "0" y = "0" fill = "none" width = "226" height = "162" rx = "3" ry = "3" > </ rect >
151
+ </ svg >
152
+ ) ;
153
+ }
154
+
142
155
return (
143
156
< div id = "animated-modal-container" className = { modalClass } >
144
157
< div
145
158
id = "animated-modal-background"
146
159
onClick = { props . closeOnBackgroundClick ? onBackgroundClick : undefined } >
147
160
< div id = "animated-modal" >
148
- < svg
149
- id = "modal-sketch-svg"
150
- xmlns = "http://www.w3.org/2000/svg"
151
- width = "100%"
152
- height = "100%"
153
- preserveAspectRatio = "none" >
154
- < rect x = "0" y = "0" fill = "none" width = "226" height = "162" rx = "3" ry = "3" > </ rect >
155
- </ svg >
161
+ { props . animation === ModalAnimation . Sketch ? sketchSVG ( ) : undefined }
156
162
< div id = "modal-content" > { props . children ? props . children : defaultModal ( ) } </ div >
157
163
</ div >
158
164
</ div >
You can’t perform that action at this time.
0 commit comments