11import styled from 'styled-components'
22
3+ import type { TActive } from '@/spec'
4+
35import css , { theme } from '@/utils/css'
46import FAQSVG from '@/icons/FAQ'
5- import ArrowSVG from '@/icons/ArrowSolid '
7+ import ArrowSVG from '@/icons/ArrowSimple '
68
79export const Wrapper = styled . div `
810 ${ css . flexColumn ( ) } ;
9- `
10- export const Header = styled . div `
11- margin-bottom: 20px;
11+ width: 55%;
12+ max-width: 55%;
13+ min-width: 550px;
14+ max-width: 550px;
1215`
1316export const FAQ = styled . div `
14- ${ css . flex ( 'align-center' ) } ;
17+ ${ css . flex ( 'align-both' ) } ;
18+ margin-bottom: 34px;
19+ margin-left: -40px;
1520`
1621export const FAQIcon = styled ( FAQSVG ) `
17- ${ css . size ( 16 ) } ;
22+ ${ css . size ( 18 ) } ;
1823 fill: ${ theme ( 'thread.articleDigest' ) } ;
19- margin-right: 10px;
2024 margin-top: 2px;
2125`
2226export const FAQTitle = styled . div `
2327 color: ${ theme ( 'thread.articleTitle' ) } ;
2428 font-size: 20px;
2529 font-weight: 500;
2630`
27- export const FAQDesc = styled . div `
28- ${ css . flex ( 'align-center ' ) } ;
31+ export const Footer = styled . div `
32+ ${ css . flex ( 'align-both ' ) } ;
2933 color: ${ theme ( 'thread.articleDigest' ) } ;
30- padding-top: 5px;
3134 font-size: 12px;
32- margin-top: 35px;
35+ margin-top: 60px;
36+ margin-left: -50px;
3337`
3438export const MoreLink = styled . div `
3539 color: ${ theme ( 'link' ) } ;
@@ -42,25 +46,41 @@ export const MoreLink = styled.div`
4246 transition: all 0.2s;
4347`
4448export const Section = styled . div `
45- ${ css . flex ( 'align-center' ) } ;
46- padding-top: 20px;
47- padding-bottom: 20px;
48- border-bottom: 1px solid;
49- border-bottom-color: ${ theme ( 'border' ) } ;
49+ padding: 18px 0;
50+ width: 100%;
5051`
51- export const ArrowIcon = styled ( ArrowSVG ) `
52- ${ css . size ( 12 ) } ;
53- fill: ${ theme ( 'thread.extraInfo' ) } ;
54- margin-right: 10px;
52+ export const Header = styled . div `
53+ ${ css . flex ( 'align-center' , 'justify-between' ) } ;
54+ cursor: pointer;
5555`
56- export const Title = styled . div `
57- ${ css . lineClamp ( 1 ) }
58- color: ${ theme ( 'thread.articleDigest' ) } ;
56+ export const Title = styled . div < TActive > `
57+ ${ css . cutRest ( '440px' ) } ;
58+ color: ${ ( { $active } ) =>
59+ $active ? theme ( 'thread.articleTitle' ) : theme ( 'thread.articleDigest' ) } ;
5960 font-size: 16px;
6061 font-weight: 500;
6162
62- & :hover {
63+ ${ Section } :hover & {
6364 color: ${ theme ( 'thread.articleTitle' ) } ;
64- cursor: pointer;
6565 }
6666`
67+ export const Body = styled . div < TActive > `
68+ color: ${ theme ( 'thread.articleDigest' ) } ;
69+ font-size: 15px;
70+ margin-top: ${ ( { show } ) => ( show ? '12px' : 0 ) } ;
71+ max-height: ${ ( { show } ) => ( show ? 'auto' : 0 ) } ;
72+ line-height: 1.8;
73+ overflow: hidden;
74+
75+ opacity: ${ ( { show } ) => ( show ? 1 : 0 ) } ;
76+ transition: all 0.3s;
77+ `
78+ export const ArrowIcon = styled ( ArrowSVG ) < TActive > `
79+ ${ css . size ( 16 ) } ;
80+ fill: ${ theme ( 'thread.extraInfo' ) } ;
81+ margin-left: 20px;
82+ margin-right: 10px;
83+ transform: ${ ( { $active } ) => ( $active ? 'rotate(270deg)' : 'rotate(90deg)' ) } ;
84+
85+ transition: all 0.5s;
86+ `
0 commit comments