This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .remove-btn { | |
| margin-right: 0.5rem; | |
| } | |
| .chore-enter { | |
| opacity: 0; | |
| } | |
| .chore-enter-active { | |
| opacity: 1; | |
| transition: opacity 500ms ease-in; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ChoresToDo = () => { | |
| const [chores, setChores] = useState([ | |
| { id: 1, text: 'Dust' }, | |
| { id: 2, text: 'Polish floors' }, | |
| { id: 3, text: 'Wipe down countertops' } | |
| ]); | |
| return ( | |
| <Container> | |
| <ListGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .fade-enter .btn { | |
| opacity: 0; | |
| transform: translateX(-100%); | |
| } | |
| .fade-enter-active .btn { | |
| opacity: 1; | |
| transform: translateX(0%); | |
| } | |
| .fade-exit .btn { | |
| opacity: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const App = () => { | |
| const [state, setState] = React.useState(true); | |
| return ( | |
| <> | |
| <div className="main"> | |
| <SwitchTransition mode={'in-out'}> | |
| <CSSTransition | |
| key={state} | |
| addEndListener={(node, done) => { | |
| node.addEventListener("transitionend", done, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .sample-enter { | |
| opacity: 0; | |
| } | |
| .sample-enter-active { | |
| opacity: .5; | |
| transition: opacity 300ms; | |
| } | |
| .sample-enter-done{ | |
| opacity: 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ExampleApp = () => { | |
| const [isVisible, setIsVisible] = useState(false); | |
| return ( | |
| <div> | |
| <CSSTransition in={isVisible} timeout={300} classNames="sample"> | |
| <div> | |
| Now you see me, next click, you don't | |
| </div> | |
| </CSSTransition> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Transition } from "react-transition-group"; | |
| const duration = 500; | |
| const defaultStyle = { | |
| transition: `opacity ${duration}ms ease-in-out`, | |
| opacity: 0, | |
| }; | |
| const transitionStyles = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div>Hi there!</div> | |
| getByText(container, 'i the', { exact: false }); | |
| getByText(container, 'hi there', { exact: false }); |
NewerOlder