File tree Expand file tree Collapse file tree 3 files changed +27
-76
lines changed Expand file tree Collapse file tree 3 files changed +27
-76
lines changed Original file line number Diff line number Diff line change 1+ import * as React from 'react'
2+ import { Badge } from '@alifd/next'
3+
4+ const styles = {
5+ betaBadge : {
6+ backgroundColor : '#6a67ce' ,
7+ color : '#FFFFFF' ,
8+ } ,
9+ }
10+
11+ type Props = {
12+ children : React . ReactElement | string
13+ }
14+
15+ const BetaBadge = ( { children } : Props ) => {
16+ return (
17+ < Badge content = "beta" style = { styles . betaBadge } >
18+ { children }
19+ </ Badge >
20+ )
21+ }
22+
23+ export default BetaBadge
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import * as React from 'react'
22import * as CR from 'typings'
33import * as G from 'typings/graphql'
4- import { Badge } from '@alifd/next '
4+ import BetaBadge from '../../components/BetaBadge '
55import { css , jsx } from '@emotion/core'
66import Button from '../../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 {
5551export const StartPage = ( props : Props ) => (
5652 < div css = { styles . page } >
5753 < div css = { styles . header } >
58- < Badge content = "beta" style = { styles . betaBadge } >
59- < h1 css = { styles . title } >
60- CodeRoad< span > </ span >
61- </ h1 >
62- </ Badge >
54+ < BetaBadge >
55+ < span css = { styles . title } > CodeRoad</ span >
56+ </ BetaBadge >
6357 < h3 css = { 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 >
You can’t perform that action at this time.
0 commit comments