Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commita2c2142

Browse files
committed
refactor(Footer): update ScribeButton style & desc text
1 parent5ff311c commita2c2142

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

‎src/components/Buttons/Button.js‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,28 @@ import T from 'prop-types'
33

44
import{Wrapper,RedWrapper}from'./styles/button'
55

6-
constButton=({ children, ghost, type, onClick, size})=>{
6+
constButton=({ children, ghost, type, onClick, size, className})=>{
77
switch(type){
88
case'red':{
99
return(
10-
<RedWrapperghost={ghost}onClick={onClick}size={size}>
10+
<RedWrapper
11+
ghost={ghost}
12+
onClick={onClick}
13+
size={size}
14+
className={className}
15+
>
1116
{children}
1217
</RedWrapper>
1318
)
1419
}
1520
default:{
1621
return(
17-
<Wrapperghost={ghost}onClick={onClick}size={size}>
22+
<Wrapper
23+
ghost={ghost}
24+
onClick={onClick}
25+
size={size}
26+
className={className}
27+
>
1828
{children}
1929
</Wrapper>
2030
)
@@ -28,6 +38,7 @@ Button.propTypes = {
2838
type:T.oneOf(['primary','red','ghost']),
2939
size:T.oneOf(['default','small']),
3040
onClick:T.func,
41+
className:T.string,
3142
}
3243

3344
Button.defaultProps={
@@ -37,6 +48,7 @@ Button.defaultProps = {
3748
size:'default',
3849
// eslint-disable-next-line no-console
3950
onClick:console.log,
51+
className:'',
4052
}
4153

4254
exportdefaultButton

‎src/containers/Footer/DigestView/ContactBar.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
importReactfrom'react'
22

3-
import{Button}from'@/components/Buttons'
43
importSocialListfrom'../SocialList'
54
import{
65
Wrapper,
@@ -17,11 +16,9 @@ const ContactBar = () => {
1716
<InnerWrapper>
1817
<SubscribeWrapper>
1918
<SubscribeInput/>
20-
<SubscribeBtn>
21-
<Button>订阅</Button>
22-
</SubscribeBtn>
19+
<SubscribeBtn>订阅</SubscribeBtn>
2320
<SubscribeText>
24-
订阅后会不定期发送社区动态,包括开发,内容等等
21+
订阅后会不定期推送社区开发及运营动态,欢迎订阅(可随时取消)。
2522
</SubscribeText>
2623
</SubscribeWrapper>
2724
<SocialList/>

‎src/containers/Footer/styles/digest_view/contact_bar.js‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importstyledfrom'styled-components'
22

3+
import{Button}from'@/components/Buttons'
34
importInputfrom'@/components/Input'
45

56
import{theme,cs}from'@/utils'
@@ -19,14 +20,20 @@ export const SubscribeWrapper = styled.div`
1920
${cs.flex('align-center')};
2021
`
2122
exportconstSubscribeInput=styled(Input)``
22-
exportconstSubscribeBtn=styled.div`
23+
exportconstSubscribeBtn=styled(Button)`
2324
margin-left: 15px;
2425
margin-right: 18px;
26+
filter: saturate(0.7);
27+
28+
${SubscribeWrapper}:hover & {
29+
filter: saturate(1);
30+
}
31+
transition: all 0.25s;
2532
`
2633
exportconstSubscribeText=styled.div`
2734
font-size: 11px;
28-
color:${theme('footer.text')};
29-
width:140px;
35+
color:${theme('footer.hover')};
36+
width:200px;
3037
line-height: 1.9;
3138
opacity: 0;
3239

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp