diff --git a/src/components/stateless/DottedStepper/index.jsx b/src/components/stateless/DottedStepper/index.jsx
index 0a87eef0..e9c94386 100644
--- a/src/components/stateless/DottedStepper/index.jsx
+++ b/src/components/stateless/DottedStepper/index.jsx
@@ -15,18 +15,18 @@ const defaultSteps = [
label: 'Personal Information',
fields: [
{ name: 'name', type: 'text', placeholder: 'Name' },
- { name: 'email', type: 'email', placeholder: 'Email' },
- ],
+ { name: 'email', type: 'email', placeholder: 'Email' }
+ ]
},
{
label: 'Address Details',
fields: [
{ name: 'address', type: 'text', placeholder: 'Address' },
{ name: 'city', type: 'text', placeholder: 'City' },
- { name: 'country', type: 'text', placeholder: 'Country' },
- ],
+ { name: 'country', type: 'text', placeholder: 'Country' }
+ ]
},
- { label: 'Review & Submit' },
+ { label: 'Review & Submit' }
]
const StepIndicator = ({ currentStep, steps }) => {
@@ -41,12 +41,12 @@ const StepIndicator = ({ currentStep, steps }) => {
const inactiveTextColor = isDark ? '#8c8c8c' : '#bfbfbf'
return (
-
+
{isMobile ? (
// 移动端垂直布局
-
+
{steps.map((step, index) => (
-
+
{
backgroundColor: index <= currentStep ? activeColor : inactiveBgColor,
color: index <= currentStep ? activeTextColor : inactiveTextColor,
borderColor: index <= currentStep ? activeColor : undefined,
- boxShadow: index <= currentStep ? `0 4px 12px ${activeColor}40` : undefined,
+ boxShadow: index <= currentStep ? `0 4px 12px ${activeColor}40` : undefined
}}
>
- {index < currentStep ? : }
+ {index < currentStep ? : }
-
+
{step.label}
{index === currentStep && (
-
+
当前步骤
)}
@@ -85,10 +85,10 @@ const StepIndicator = ({ currentStep, steps }) => {
) : (
// 桌面端水平布局
-
+
{steps.map((step, index) => (
-
+
{
backgroundColor: index <= currentStep ? activeColor : inactiveBgColor,
color: index <= currentStep ? activeTextColor : inactiveTextColor,
borderColor: index <= currentStep ? activeColor : undefined,
- boxShadow: index <= currentStep ? `0 4px 12px ${activeColor}40` : undefined,
+ boxShadow: index <= currentStep ? `0 4px 12px ${activeColor}40` : undefined
}}
>
- {index < currentStep ? : }
+ {index < currentStep ? : }
{
index <= currentStep ? '' : 'text-gray-500 dark:text-gray-400'
)}
style={{
- color: index <= currentStep ? activeColor : undefined,
+ color: index <= currentStep ? activeColor : undefined
}}
>
{step.label}
{index < steps.length - 1 && (
-
+
@@ -146,7 +146,7 @@ const StepIndicator = ({ currentStep, steps }) => {
StepIndicator.propTypes = {
currentStep: PropTypes.number.isRequired,
- steps: PropTypes.array.isRequired,
+ steps: PropTypes.array.isRequired
}
const StepContent = ({ step }) => {
@@ -156,33 +156,33 @@ const StepContent = ({ step }) => {
return (
-
-
-
+
+
+
{step.label}
-
+
Step content for {step.label}
{step.fields && (
-
+
{step.fields.map((field) => (
@@ -196,7 +196,7 @@ const StepContent = ({ step }) => {
}
StepContent.propTypes = {
- step: PropTypes.object.isRequired,
+ step: PropTypes.object.isRequired
}
const NavigationButtons = ({ currentStep, totalSteps, handlePrev, handleNext }) => {
@@ -215,27 +215,27 @@ const NavigationButtons = ({ currentStep, totalSteps, handlePrev, handleNext })