1- import React , { useState } from "react" ;
1+ import React , { useState } from "react" ;
22import quickstarts from "./QuickStartList" ;
33import Link from "@docusaurus/Link" ;
4- import { FaGolang } from "react-icons/fa6" ;
5- import { FaJava , FaLaptopCode , FaDocker , FaPython , FaCheck , FaArrowRight , FaArrowLeft } from "react-icons/fa" ;
6- import { TbBrandCSharp } from "react-icons/tb" ;
7- import { IoLogoJavascript } from "react-icons/io5" ;
8- import { useColorMode } from "@docusaurus/theme-common" ;
4+ import { FaGolang , FaRust } from "react-icons/fa6" ;
5+ import { FaJava , FaLaptopCode , FaDocker , FaPython , FaCheck , FaArrowRight , FaArrowLeft } from "react-icons/fa" ;
6+ import { TbBrandCSharp } from "react-icons/tb" ;
7+ import { IoLogoJavascript } from "react-icons/io5" ;
8+ import { useColorMode } from "@docusaurus/theme-common" ;
99
10- export default function QuickstartFilter ( { defaultLanguage = null } ) {
11- const { colorMode} = useColorMode ( ) ;
10+ export default function QuickstartFilter ( { defaultLanguage = null } ) {
11+ const { colorMode } = useColorMode ( ) ;
1212 const isDark = colorMode === "dark" ;
1313
1414 const [ currentStep , setCurrentStep ] = useState ( defaultLanguage ? 2 : 1 ) ;
@@ -23,22 +23,23 @@ export default function QuickstartFilter({defaultLanguage = null}) {
2323 } ) ;
2424
2525 const languages = [
26- { name : "Go" , icon : < FaGolang size = { 24 } /> , color : "#00ADD8" } ,
27- { name : "Python" , icon : < FaPython size = { 24 } /> , color : "#3776AB" } ,
28- { name : "Java" , icon : < FaJava size = { 24 } /> , color : "#007396" } ,
29- { name : "JS/TS" , icon : < IoLogoJavascript size = { 24 } /> , color : "#F7DF1E" } ,
30- { name : "C#" , icon : < TbBrandCSharp size = { 24 } /> , color : "#512BD4" } ,
26+ { name : "Go" , icon : < FaGolang size = { 24 } /> , color : "#00ADD8" } ,
27+ { name : "Python" , icon : < FaPython size = { 24 } /> , color : "#3776AB" } ,
28+ { name : "Java" , icon : < FaJava size = { 24 } /> , color : "#007396" } ,
29+ { name : "JS/TS" , icon : < IoLogoJavascript size = { 24 } /> , color : "#F7DF1E" } ,
30+ { name : "C#" , icon : < TbBrandCSharp size = { 24 } /> , color : "#512BD4" } ,
31+ { name : "Rust" , icon : < FaRust size = { 24 } /> , color : "#DEA584" } ,
3132 ] ;
3233
3334 const servers = [
34- { name : "Local" , icon : < FaLaptopCode size = { 24 } /> , description : "Run directly on your machine" } ,
35- { name : "Docker" , icon : < FaDocker size = { 24 } /> , description : "Run in a Docker container" } ,
35+ { name : "Local" , icon : < FaLaptopCode size = { 24 } /> , description : "Run directly on your machine" } ,
36+ { name : "Docker" , icon : < FaDocker size = { 24 } /> , description : "Run in a Docker container" } ,
3637 ] ;
3738
3839 const steps = [
39- { id : 1 , label : "Language" , icon : languages . find ( l => l . name === language ) ?. icon || null } ,
40- { id : 2 , label : "Environment" , icon : server === "Docker" ? < FaDocker size = { 16 } /> : server === "Local" ? < FaLaptopCode size = { 16 } /> : null } ,
41- { id : 3 , label : "Quickstart" , icon : null } ,
40+ { id : 1 , label : "Language" , icon : languages . find ( l => l . name === language ) ?. icon || null } ,
41+ { id : 2 , label : "Environment" , icon : server === "Docker" ? < FaDocker size = { 16 } /> : server === "Local" ? < FaLaptopCode size = { 16 } /> : null } ,
42+ { id : 3 , label : "Quickstart" , icon : null } ,
4243 ] ;
4344
4445 const handleLanguageSelect = ( lang ) => {
@@ -372,10 +373,10 @@ export default function QuickstartFilter({defaultLanguage = null}) {
372373 </ div >
373374 < span > { step . label } </ span >
374375 { currentStep > step . id && step . id === 1 && language && (
375- < span style = { { color : '#ff914d' , marginLeft : '0.25rem' } } > ({ language } )</ span >
376+ < span style = { { color : '#ff914d' , marginLeft : '0.25rem' } } > ({ language } )</ span >
376377 ) }
377378 { currentStep > step . id && step . id === 2 && server && (
378- < span style = { { color : '#ff914d' , marginLeft : '0.25rem' } } > ({ server } )</ span >
379+ < span style = { { color : '#ff914d' , marginLeft : '0.25rem' } } > ({ server } )</ span >
379380 ) }
380381 </ div >
381382 { idx < steps . length - 1 && (
@@ -402,7 +403,7 @@ export default function QuickstartFilter({defaultLanguage = null}) {
402403 < div className = "wizard-option-radio" >
403404 { language === lang . name && < FaCheck size = { 10 } color = "#fff" /> }
404405 </ div >
405- < div className = "wizard-option-icon" style = { { color : lang . color } } >
406+ < div className = "wizard-option-icon" style = { { color : lang . color } } >
406407 { lang . icon }
407408 </ div >
408409 < span className = "wizard-option-label" > { lang . name } </ span >
@@ -417,15 +418,15 @@ export default function QuickstartFilter({defaultLanguage = null}) {
417418 < >
418419 < h3 className = "wizard-title" > Select your environment</ h3 >
419420 < p className = "wizard-subtitle" > Choose where you want to run the application server</ p >
420- < div className = "wizard-options" style = { { gridTemplateColumns : 'repeat(auto-fill, minmax(220px, 1fr))' } } >
421+ < div className = "wizard-options" style = { { gridTemplateColumns : 'repeat(auto-fill, minmax(220px, 1fr))' } } >
421422 { servers . map ( ( srv ) => (
422423 < button
423424 key = { srv . name }
424425 className = { `wizard-option ${ server === srv . name ? 'selected' : '' } ` }
425426 onClick = { ( ) => handleServerSelect ( srv . name ) }
426- style = { { flexDirection : 'column' , alignItems : 'flex-start' , gap : '0.5rem' } }
427+ style = { { flexDirection : 'column' , alignItems : 'flex-start' , gap : '0.5rem' } }
427428 >
428- < div style = { { display : 'flex' , alignItems : 'center' , gap : '0.75rem' , width : '100%' } } >
429+ < div style = { { display : 'flex' , alignItems : 'center' , gap : '0.75rem' , width : '100%' } } >
429430 < div className = "wizard-option-radio" >
430431 { server === srv . name && < FaCheck size = { 10 } color = "#fff" /> }
431432 </ div >
@@ -434,7 +435,7 @@ export default function QuickstartFilter({defaultLanguage = null}) {
434435 </ div >
435436 < span className = "wizard-option-label" > { srv . name } </ span >
436437 </ div >
437- < p className = "wizard-option-desc" style = { { marginLeft : '3.5rem' } } > { srv . description } </ p >
438+ < p className = "wizard-option-desc" style = { { marginLeft : '3.5rem' } } > { srv . description } </ p >
438439 </ button >
439440 ) ) }
440441 </ div >
0 commit comments