Coder Social home page Coder Social logo

Comments (6)

oguzkaganeren avatar oguzkaganeren commented on June 16, 2024 1
const CustomSteps = {
  ...StepsStyleConfig,
  baseStyle: (props:any) => ({
    ...StepsStyleConfig.baseStyle(props),
    stepIconContainer: {
      ...StepsStyleConfig.baseStyle(props).stepIconContainer,
      _activeStep: {
        bg: 'red',
      },
    },
  }),
};
```    Thanks a lot, I fixed.

from chakra-ui-steps.

danielbuechele avatar danielbuechele commented on June 16, 2024 1

I am experiencing the same issue. While customizing the color of the active step fixes the problem, I think this still is a bug, that incorrectly in light mode, the dark mode background color for the active step is used.

from chakra-ui-steps.

rafaelcastan avatar rafaelcastan commented on June 16, 2024

Hi, I have found a solution for this, in your theme file create a custom theme for the component this way:

const Steps = {
  ...StepsStyleConfig,
  baseStyle: (props: any) => {
    return {
      stepIconContainer: {
        ...StepsStyleConfig.baseStyle(props).stepIconContainer,
        _activeStep: {
          bg: "red",
        },
      },
    };
  },
};

from chakra-ui-steps.

oguzkaganeren avatar oguzkaganeren commented on June 16, 2024

It worked but when apply custom theme, then it turns like this
image

from chakra-ui-steps.

rafaelcastan avatar rafaelcastan commented on June 16, 2024

Have you tried to set the orientation property to horizontal?

Edit:

I have take a look, and appears that the Step component is setting the orientation property to vertical on screen resize and not change it back to horizontal, you can use chakra useBreakpointValue to overwrite it

from chakra-ui-steps.

Aichnerc avatar Aichnerc commented on June 16, 2024

Had same issue.

Adding that to the theme did work for me.

Steps: {
  ...StepsStyleConfig,
  baseStyle: (props) => ({
    ...StepsStyleConfig.baseStyle(props),
    stepIconContainer: {
      ...StepsStyleConfig.baseStyle(props).stepIconContainer,
      _activeStep: {
        ...StepsStyleConfig.baseStyle(props).stepIconContainer._activeStep,
        bg: "rgb(224, 231, 239)", // Default color for light mode
      },
    },
  }),
},

from chakra-ui-steps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.