This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/containers/tool/ArticleSticker Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const ArticleStickerContainer: FC<TProps> = ({
4545 viewingData,
4646 activeThread,
4747 isTocMenuOpened,
48+ isArticleDigestInViewport,
4849 showCommentSticker,
4950 } = store
5051
@@ -67,7 +68,7 @@ const ArticleStickerContainer: FC<TProps> = ({
6768 />
6869 < CommentSticker show = { showCommentSticker } data = { viewingData } />
6970 </ MainWrapper >
70- < GoTopWrapper >
71+ < GoTopWrapper show = { ! isArticleDigestInViewport } >
7172 < GotoTop />
7273 </ GoTopWrapper >
7374 </ InnerWrapper >
Original file line number Diff line number Diff line change 11import styled from 'styled-components'
22
3- import type { TTestable , TMetric } from '@/spec'
3+ import type { TTestable , TMetric , TActive } from '@/spec'
44import Img from '@/Img'
55import { animate , theme , css } from '@/utils'
66
@@ -10,9 +10,7 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
1010} ) ) < TWrapper > `
1111 ${ css . flexColumn ( 'align-center' , 'justify-start' ) } ;
1212 ${ ( { metric } ) => css . fitStickerWidth ( metric ) } ;
13- /* bottom has a go-to-top button */
14- height: 85vh;
15- /* border: 1px solid tomato; */
13+ min-height: 68vh;
1614`
1715export const InnerWrapper = styled . div `
1816 ${ css . flexColumn ( 'justify-between' ) }
@@ -73,8 +71,10 @@ export const Text = styled.div`
7371 font-size: 11px;
7472`
7573
76- export const GoTopWrapper = styled . div `
74+ export const GoTopWrapper = styled . div < TActive > `
7775 ${ css . flex ( 'align-both' ) } ;
78- position: relative;
76+ opacity: ${ ( { show } ) => ( show ? 1 : 0 ) } ;
77+ position: absolute;
78+ bottom: -50px;
7979 width: 100%;
8080`
You can’t perform that action at this time.
0 commit comments