File tree Expand file tree Collapse file tree 5 files changed +261
-224
lines changed
Expand file tree Collapse file tree 5 files changed +261
-224
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import {
3+ StepItem ,
4+ StepNumber ,
5+ StepTitle ,
6+ StepDescription ,
7+ CodeBlock
8+ } from '../../styles/components/Installation.styles' ;
9+ import CustomCodeBlock from '../CustomCodeBlock' ;
10+
11+ interface InstallationStepProps {
12+ number : number ;
13+ title : string ;
14+ description : string ;
15+ code : string ;
16+ language : string ;
17+ }
18+
19+ const InstallationStep : React . FC < InstallationStepProps > = ( {
20+ number,
21+ title,
22+ description,
23+ code,
24+ language
25+ } ) => {
26+ return (
27+ < StepItem >
28+ < StepNumber > { number } </ StepNumber >
29+ < StepTitle > { title } </ StepTitle >
30+ < StepDescription > { description } </ StepDescription >
31+ < CodeBlock >
32+ < CustomCodeBlock
33+ code = { code }
34+ language = { language }
35+ />
36+ </ CodeBlock >
37+ </ StepItem >
38+ ) ;
39+ } ;
40+
41+ export default InstallationStep ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import {
3+ SectionContainer ,
4+ SectionInner ,
5+ SectionHeading ,
6+ Title ,
7+ Subtitle ,
8+ InstallationContent ,
9+ StepsList
10+ } from '../../styles/components/Installation.styles' ;
11+ import InstallationStep from './InstallationStep' ;
12+ import { leftColumnSteps , rightColumnSteps } from './stepsData' ;
13+
14+ const Installation : React . FC = ( ) => {
15+ return (
16+ < SectionContainer id = "installation" >
17+ < SectionInner >
18+ < SectionHeading >
19+ < Title > 安装指南</ Title >
20+ < Subtitle >
21+ 通过几个简单的步骤,开始使用Typescript Userscript Template开发你的用户脚本
22+ </ Subtitle >
23+ </ SectionHeading >
24+
25+ < InstallationContent >
26+ < StepsList >
27+ { leftColumnSteps . map ( ( step , index ) => (
28+ < InstallationStep
29+ key = { `left-step-${ index + 1 } ` }
30+ number = { index + 1 }
31+ title = { step . title }
32+ description = { step . description }
33+ code = { step . code }
34+ language = { step . language }
35+ />
36+ ) ) }
37+ </ StepsList >
38+
39+ < StepsList >
40+ { rightColumnSteps . map ( ( step , index ) => (
41+ < InstallationStep
42+ key = { `right-step-${ index + 4 } ` }
43+ number = { index + 4 }
44+ title = { step . title }
45+ description = { step . description }
46+ code = { step . code }
47+ language = { step . language }
48+ />
49+ ) ) }
50+ </ StepsList >
51+ </ InstallationContent >
52+ </ SectionInner >
53+ </ SectionContainer >
54+ ) ;
55+ } ;
56+
57+ export default Installation ;
You can’t perform that action at this time.
0 commit comments