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

Better support for overriding styles #23

Closed pianomansam closed 3 years ago

pianomansam commented 3 years ago

I love this library, however, I have the need to make more style changes than is currently supported. This PR adds the following changes/capabilities:

  1. Move the step styles to the end of the step's __css property so that the default CSS attributes can be overridden (such as flex and opacity).
  2. Add a stepContainer style part so that it can be styled.
  3. Add a labelContainer style part so that it can be styled.
  4. Allow the label to be a react component
DannyFeliz commented 3 years ago

PING @jeanverster 👀

jeanverster commented 3 years ago

Hey guys, apologies for the super late response.. I have recently moved to another country so has taken some time to get settled here and I haven't had much time to tend to this repo.. With that said, @pianomansam the PR looks good - could you please change the base to the develop branch (so that semantic release can run accordingly). A couple more things:

pianomansam commented 3 years ago

@jeanverster the base has been changed to the develop branch. Removing yarn.lock was a mistake and it has been restored.

I think if you allow the label to be of React.ReactNode you will need some kinda check otherwise it would be rendered inside the existing span, unless that's the desired behaviour?

That is the intended behavior. Styling still gets applied to the existing span, then the ReactNode inside it can either inherit styles or do its own thing. I'm using my branch on a project right now and it works great.

pianomansam commented 3 years ago

@jeanverster what's the next step to getting a release with this included?

jeanverster commented 3 years ago

Hey @pianomansam apologies, will get this released in the next hour or so - was busy addressing some of the other issues and forgot to push a new release.. Will ping you when done 👌🏼

jeanverster commented 3 years ago

@pianomansam released in v1.4.0 - note I made some changes to the multi part styling so you will need to update your chakra ui version to at least 1.6.7 for it to work, sorry for the inconvenience!