@@ -32,27 +32,21 @@ const subItemAnimation = {
3232 } ,
3333} ;
3434
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+ ) ) `
3638 display: flex;
3739 align-items: center;
3840 font-weight: ${ p => p . theme . fontWeightNormal } ;
3941 margin-bottom: ${ space ( 1 ) } ;
4042` ;
4143
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+ ) ) `
4847 margin-bottom: ${ space ( 2 ) } ;
4948` ;
5049
51- Body . defaultProps = {
52- variants : subItemAnimation ,
53- transition : testableTransition ( ) ,
54- } ;
55-
5650type ContentOpts = {
5751 Body : typeof Body ;
5852 Header : typeof Header ;
@@ -206,7 +200,13 @@ function PageOverlay({
206200 return (
207201 < MaskedContent { ...props } >
208202 { 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+ >
210210 { BackgroundComponent && (
211211 < Background >
212212 < BackgroundComponent anchorRef = { anchorRef } />
@@ -234,11 +234,6 @@ const ContentWrapper = styled(motion.div)`
234234 z-index: 900;
235235` ;
236236
237- ContentWrapper . defaultProps = {
238- initial : 'initial' ,
239- animate : 'animate' ,
240- } ;
241-
242237const Background = styled ( 'div' ) `
243238 ${ absoluteFull }
244239 z-index: -1;
0 commit comments