File tree Expand file tree Collapse file tree 11 files changed +59
-25
lines changed Expand file tree Collapse file tree 11 files changed +59
-25
lines changed Original file line number Diff line number Diff line change 1+ import * as React from 'react'
2+ import { Button as AlifdButton } from '@alifd/next'
3+
4+ interface Props {
5+ children : string
6+ type ?: 'primary' | 'secondary' | 'normal'
7+ onClick ( ) : void
8+ }
9+
10+ const Button = ( props : Props ) => (
11+ < AlifdButton onClick = { props . onClick } type = { props . type } >
12+ { props . children }
13+ </ AlifdButton >
14+ )
15+
16+ export default Button
Original file line number Diff line number Diff line change 1+ import * as React from 'react'
2+ import { Card as AlifdCard } from '@alifd/next'
3+
4+ interface Props {
5+ children : React . ReactNode
6+ onClick ?: ( ) => void
7+ style ?: React . CSSProperties
8+ }
9+
10+ const Card = ( props : Props ) => (
11+ < AlifdCard showTitleBullet = { false } contentHeight = "auto" onClick = { props . onClick } style = { props . style } >
12+ { props . children }
13+ </ AlifdCard >
14+ )
15+
16+ export default Card
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import { Button , Card } from '@alifd/next'
2+ import Button from '../../components/Button'
3+ import Card from '../../components/Card'
34import * as CR from 'typings'
45import * as G from 'typings/graphql'
56
@@ -12,14 +13,14 @@ interface Props {
1213export const ContinuePage = ( props : Props ) => (
1314 < div >
1415 < h3 > Continue</ h3 >
15- < Card showTitleBullet = { false } contentHeight = "auto" >
16+ < Card >
1617 < div >
1718 < h2 > { props . tutorial . version . summary . title } </ h2 >
1819 < p > { props . tutorial . version . summary . description } </ p >
1920 < Button onClick = { props . onContinue } > Resume</ Button >
2021 </ div >
2122 </ Card >
22- < Card showTitleBullet = { false } contentHeight = "auto" >
23+ < Card >
2324 < div >
2425 < h2 > Start a New Tutorial</ h2 >
2526 < Button onClick = { props . onNew } > Select New Tutorial</ Button >
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import { Button , Card } from '@alifd/next'
2+ import Button from '../../components/Button'
3+ import Card from '../../components/Card'
34
45interface Props {
56 title : string
@@ -9,7 +10,7 @@ interface Props {
910
1011const TutorialItem = ( props : Props ) => {
1112 return (
12- < Card showTitleBullet = { false } contentHeight = "auto" >
13+ < Card >
1314 < div >
1415 < h2 > { props . title } </ h2 >
1516 < p > { props . description } </ p >
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import { Card } from '@alifd/next '
2+ import Card from '../../../components/Card '
33
44const styles = {
55 card : {
Original file line number Diff line number Diff line change 11import * as React from 'react'
2-
3- import channel from '../../../services/channel'
42import * as G from 'typings/graphql'
3+
54import TutorialItem from './TutorialItem'
5+ import channel from '../../../services/channel'
66
77interface Props {
88 tutorialList : G . Tutorial [ ]
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import { Button } from '@alifd/next '
2+ import Button from '../../components/Button '
33import * as G from 'typings/graphql'
44
55import Markdown from '../../components/Markdown'
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import { Button } from '@alifd/next '
2+ import Button from '../../components/Button '
33import * as CR from 'typings'
44
55const styles = {
@@ -9,22 +9,22 @@ const styles = {
99}
1010
1111interface Props {
12- context : CR . MachineContext
13- send ( action : CR . Action | string ) : void
12+ context : CR . MachineContext
13+ send ( action : CR . Action | string ) : void
1414}
1515
1616const CompletedPage = ( props : Props ) => {
17- const selectNewTutorial = ( ) => {
18- props . send ( 'SELECT_TUTORIAL' )
19- }
17+ const selectNewTutorial = ( ) => {
18+ props . send ( 'SELECT_TUTORIAL' )
19+ }
2020 return (
21- < div >
22- < h3 > Tutorial Complete</ h3 >
23- < div style = { styles . options } >
24- < Button onClick = { selectNewTutorial } > Continue</ Button >
25- </ div >
26- </ div >
27- )
21+ < div >
22+ < h3 > Tutorial Complete</ h3 >
23+ < div style = { styles . options } >
24+ < Button onClick = { selectNewTutorial } > Continue</ Button >
25+ </ div >
26+ </ div >
27+ )
2828}
2929
3030export default CompletedPage
Original file line number Diff line number Diff line change 11import * as React from 'react'
22import * as T from 'typings'
3- import { Button } from '@alifd/next '
3+ import Button from '../../../../../components/Button '
44import Checkbox from '../../../../../components/Checkbox'
55import Markdown from '../../../../../components/Markdown'
66
Original file line number Diff line number Diff line change 1- import { Button } from '@alifd/next'
21import * as React from 'react'
32import * as G from 'typings/graphql'
43import * as T from 'typings'
54
65import Step from './Step'
6+ import Button from '../../../../components/Button'
77import Markdown from '../../../../components/Markdown'
88
99const styles = {
You can’t perform that action at this time.
0 commit comments