This repository was archived by the owner on Sep 14, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import type { FC } from "react" ;
3+ import { Row , Col } from "react-bootstrap" ;
4+ import { ECMA_VERSIONS , ECMA_FEATURES } from "@/components/constants" ;
5+
6+ interface Props {
7+ ecmaVersion : typeof ECMA_VERSIONS [ number ] ;
8+ ecmaFeatures : typeof ECMA_FEATURES [ number ] ;
9+ }
10+
11+ export const ParserOptions : FC < Props > = ( props ) => {
12+ return (
13+ < >
14+ < Row >
15+ < Col md = { 4 } >
16+ < label htmlFor = "ecmaVersion" > ECMA Version </ label >
17+ </ Col >
18+ < Col md = { 8 } >
19+ < select id = "ecmaVersion" >
20+ { ECMA_VERSIONS . map ( ( version ) => (
21+ < option value = { version } key = { version } >
22+ { version }
23+ </ option >
24+ ) ) }
25+ </ select >
26+ </ Col >
27+ </ Row >
28+ < Row >
29+ < Col md = { 4 } >
30+ < label htmlFor = "ecmaVersion" > ECMA Features </ label >
31+ </ Col >
32+ < Col md = { 8 } >
33+ { ECMA_FEATURES . map ( ( ecmaFeature ) => (
34+ < div className = "checkbox" key = { ecmaFeature } >
35+ < label htmlFor = { ecmaFeature } >
36+ < input
37+ type = "checkbox"
38+ className = "option-checkbox"
39+ id = { ecmaFeature }
40+ />
41+ { ecmaFeature }
42+ </ label >
43+ </ div >
44+ ) ) }
45+ </ Col >
46+ </ Row >
47+ </ >
48+ ) ;
49+ } ;
You can’t perform that action at this time.
0 commit comments