@@ -32,27 +32,21 @@ const subItemAnimation = {
32
32
} ,
33
33
} ;
34
34
35
- const Header = styled ( motion . h2 ) `
35
+ const Header = styled ( ( props : React . ComponentProps < typeof motion . h2 > ) => (
36
+ < motion . h2 variants = { subItemAnimation } transition = { testableTransition ( ) } { ...props } />
37
+ ) ) `
36
38
display: flex;
37
39
align-items: center;
38
40
font-weight: ${ p => p . theme . fontWeightNormal } ;
39
41
margin-bottom: ${ space ( 1 ) } ;
40
42
` ;
41
43
42
- Header . defaultProps = {
43
- variants : subItemAnimation ,
44
- transition : testableTransition ( ) ,
45
- } ;
46
-
47
- const Body = styled ( motion . div ) `
44
+ const Body = styled ( ( props : React . ComponentProps < typeof motion . div > ) => (
45
+ < motion . div variants = { subItemAnimation } transition = { testableTransition ( ) } { ...props } />
46
+ ) ) `
48
47
margin-bottom: ${ space ( 2 ) } ;
49
48
` ;
50
49
51
- Body . defaultProps = {
52
- variants : subItemAnimation ,
53
- transition : testableTransition ( ) ,
54
- } ;
55
-
56
50
type ContentOpts = {
57
51
Body : typeof Body ;
58
52
Header : typeof Header ;
@@ -206,7 +200,13 @@ function PageOverlay({
206
200
return (
207
201
< MaskedContent { ...props } >
208
202
{ children }
209
- < ContentWrapper ref = { contentRef } transition = { transition } variants = { { animate : { } } } >
203
+ < ContentWrapper
204
+ initial = "initial"
205
+ animate = "animate"
206
+ ref = { contentRef }
207
+ transition = { transition }
208
+ variants = { { animate : { } } }
209
+ >
210
210
{ BackgroundComponent && (
211
211
< Background >
212
212
< BackgroundComponent anchorRef = { anchorRef } />
@@ -234,11 +234,6 @@ const ContentWrapper = styled(motion.div)`
234
234
z-index: 900;
235
235
` ;
236
236
237
- ContentWrapper . defaultProps = {
238
- initial : 'initial' ,
239
- animate : 'animate' ,
240
- } ;
241
-
242
237
const Background = styled ( 'div' ) `
243
238
${ absoluteFull }
244
239
z-index: -1;
0 commit comments