Skip to content

Commit

Permalink
Position absolutely to show on top of each other
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr committed Nov 22, 2023
1 parent 8bb46bb commit a60df27
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pages/quotes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const QuoteContainer: React.FC<
> = ({ quoteIndex, children }) => {
return (
<QuoteContainer_>
<TransitionGroup appear={true}>
<TransitionGroup>
<CSSTransition
key={quoteIndex.toString()}
classNames="fade"
Expand All @@ -82,12 +82,22 @@ const QuoteContainer: React.FC<
const QuoteContainer_ = styled.div`
background-color: red;
position: relative;
div {
border: 1px solid green;
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.fade-enter {
opacity: 0;
z-index: 1;
}
.fade-enter-active {
opacity: 1;
transition: opacity 1000ms 1000ms;
transition: opacity 1000ms;
}
.fade-exit {
opacity: 1;
Expand Down

0 comments on commit a60df27

Please sign in to comment.