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

Commit642f134

Browse files
committed
cleanup betabadge
1 parentcd840d4 commit642f134

File tree

3 files changed

+27
-76
lines changed

3 files changed

+27
-76
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import*asReactfrom'react'
2+
import{Badge}from'@alifd/next'
3+
4+
conststyles={
5+
betaBadge:{
6+
backgroundColor:'#6a67ce',
7+
color:'#FFFFFF',
8+
},
9+
}
10+
11+
typeProps={
12+
children:React.ReactElement|string
13+
}
14+
15+
constBetaBadge=({ children}:Props)=>{
16+
return(
17+
<Badgecontent="beta"style={styles.betaBadge}>
18+
{children}&nbsp;&nbsp;
19+
</Badge>
20+
)
21+
}
22+
23+
exportdefaultBetaBadge

‎web-app/src/containers/Continue/index.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

‎web-app/src/containers/Start/index.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import*asReactfrom'react'
22
import*asCRfrom'typings'
33
import*asGfrom'typings/graphql'
4-
import{Badge}from'@alifd/next'
4+
importBetaBadgefrom'../../components/BetaBadge'
55
import{css,jsx}from'@emotion/core'
66
importButtonfrom'../../components/Button'
77

@@ -37,10 +37,6 @@ const styles = {
3737
justifyContent:'flex-start'as'flex-start',
3838
alignItems:'center'as'center',
3939
},
40-
betaBadge:{
41-
backgroundColor:'#6a67ce',
42-
color:'#FFFFFF',
43-
},
4440
buttonContainer:{
4541
margin:'0.5rem',
4642
},
@@ -55,11 +51,9 @@ interface Props {
5551
exportconstStartPage=(props:Props)=>(
5652
<divcss={styles.page}>
5753
<divcss={styles.header}>
58-
<Badgecontent="beta"style={styles.betaBadge}>
59-
<h1css={styles.title}>
60-
CodeRoad<span>&nbsp;</span>
61-
</h1>
62-
</Badge>
54+
<BetaBadge>
55+
<spancss={styles.title}>CodeRoad</span>
56+
</BetaBadge>
6357
<h3css={styles.subtitle}>Play Interactive Coding Tutorials in VSCode</h3>
6458
<p>Learn by coding in a real environment.</p>
6559
<p>Instant feedback on save.</p>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp