jeanverster / chakra-ui-steps

Steps component designed to work seamlessly with Chakra UI
https://chakra-ui-steps.vercel.app
390 stars 44 forks source link

In the latest version of the library, with state="error" all previous steps change color to red #126

Open woodjs opened 1 year ago

woodjs commented 1 year ago
"chakra-ui-steps": "^2.0.4",
"@chakra-ui/icons": "^2.0.13",
"@chakra-ui/react": "^2.4.2",
...
export default function TestPage() {
  const { activeStep, setActiveStep } = useSteps({
    initialStep: 2,
  });

  return (
    <Steps activeStep={activeStep} onChange={setActiveStep} state="error">
      <Step label="Label 1" />
      <Step label="Label 2" />
      <Step label="Label 3" />
    </Steps>
  );
}

The official example shows that with state="error" the current step changes color to red, while all previous successful ones remain unchanged, but this code changes all steps to red.

huseyindeniz commented 1 year ago

This change is introduced in version 2x and examples page is still using 1x I think. And I agree that showing all previous steps as red is not very proper in most cases. I'm wondering if there is a way to set it as old way: The state which failed is red and all previous ones are green.