Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions src/containers/content/HelpCenterContent/Footer/Reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { ICON } from '@/config'

import {
Wrapper,
RateWrapper,
ShareWrapper,
ShareList,
ShareIcon,
Title,
BoxWrapper,
Button,
Expand All @@ -27,19 +31,28 @@ const Reaction: React.FC<TProps> = ({ visibles }) => {
const { uselessClicked } = visibles
return (
<Wrapper>
<Title>这些信息是否有用?</Title>
<BoxWrapper>
<Button onClick={usefulOnClick}>
<UsefulIcon src={`${ICON}/useful-color.svg`} />
<UsefulText>有用</UsefulText>
</Button>
<UselessWrapper>
<UselessButton active={uselessClicked} onClick={uselessOnClick}>
<CryIcon src={`${ICON}/shape/cry.svg`} active={uselessClicked} />
</UselessButton>
<UselessText>没有帮助</UselessText>
</UselessWrapper>
</BoxWrapper>
<RateWrapper>
<Title>这些信息是否有用?</Title>
<BoxWrapper>
<Button onClick={usefulOnClick}>
<UsefulIcon src={`${ICON}/useful-color.svg`} />
<UsefulText>有用</UsefulText>
</Button>
<UselessWrapper>
<UselessButton active={uselessClicked} onClick={uselessOnClick}>
<CryIcon src={`${ICON}/shape/cry.svg`} active={uselessClicked} />
</UselessButton>
<UselessText>没有帮助</UselessText>
</UselessWrapper>
</BoxWrapper>
</RateWrapper>
<ShareWrapper>
<ShareList>
<ShareIcon src={`${ICON}/social/weichat.svg`} />
<ShareIcon src={`${ICON}/social/twitter.svg`} />
<ShareIcon src={`${ICON}/social/zhihu.svg`} />
</ShareList>
</ShareWrapper>
</Wrapper>
)
}
Expand Down
27 changes: 27 additions & 0 deletions src/containers/content/HelpCenterContent/styles/footer/reaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ import Img from '@/Img'
import { css, theme } from '@/utils'

export const Wrapper = styled.div`
${css.flex()};
margin-bottom: 25px;
margin-right: 30px;
`
export const RateWrapper = styled.div`
flex-grow: 1;
`
// reactions
export const Title = styled.div`
font-size: 14px;
margin-bottom: 14px;
`
export const BoxWrapper = styled.div`
Expand Down Expand Up @@ -64,3 +71,23 @@ export const UselessText = styled.span`

transition: opacity 0.25s ease-in-out;
`

export const ShareWrapper = styled.div`
${css.flexColumn('justify-end')};
`
export const ShareList = styled.div`
${css.flex('align-center')};
margin-bottom: 6px;
`
export const ShareIcon = styled(Img)`
fill: ${theme('banner.desc')};
${css.size(16)};
margin-left: 12px;

&:hover {
fill: ${theme('banner.title')};
cursor: pointer;
}

transition: all 0.25s;
`