Open garima33 opened 6 years ago
import React, { Component } from "react"; import styled from "react-emotion"; import { TransitionMotion, spring } from "react-motion"; import { TopNav } from "./TopNav"; import Calendar from "./Calender";
export default class CalendarContainer extends Component { willLeave = () => { return { scale: 0 }; }; render() { const Container = styled("div") padding: 1em; margin: 2em; ; return ( <TransitionMotion willLeave={this.willLeave} defaultStyles={[ { key: "key", style: { scale: 0 } } ]} styles={[ { key: "key", style: { scale: spring(1) } } ]}
padding: 1em; margin: 2em;
{interpolatedStyles => ( {" "} {interpolatedStyles.map(config => { return ( ); })} )} ); } }
{interpolatedStyles => (
)} ); } }
if i change Calender to div it works. Can someone explain y ?
import React, { Component } from "react"; import styled from "react-emotion"; import { TransitionMotion, spring } from "react-motion"; import { TopNav } from "./TopNav"; import Calendar from "./Calender";
export default class CalendarContainer extends Component { willLeave = () => { return { scale: 0 }; }; render() { const Container = styled("div")
padding: 1em; margin: 2em;
; return ( <TransitionMotion willLeave={this.willLeave} defaultStyles={[ { key: "key", style: { scale: 0 } } ]} styles={[ { key: "key", style: { scale: spring(1) } } ]}if i change Calender to div it works. Can someone explain y ?