hikaya-io / hakawati

A collection of UI components
GNU General Public License v3.0
2 stars 1 forks source link

refactor(h-select): enhanced h-select component #328

Closed amosnjoroge closed 2 years ago

amosnjoroge commented 2 years ago

What is the Purpose?

Refactor hSelect component

Mentions?

@andrewtpham @ninetteadhikari @michaelbukachi

Issue(s) affected?

https://github.com/hikaya-io/hakawati/issues/309

netlify[bot] commented 2 years ago

Deploy Preview for hakawati ready!

Name Link
Latest commit 3cb8243bf388216458c687909e8f4222aabc9ac3
Latest deploy log https://app.netlify.com/sites/hakawati/deploys/62c5f2d1446631000839d333
Deploy Preview https://deploy-preview-328--hakawati.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

andrewtpham commented 2 years ago

Hey @amosnjoroge, I noticed in the select component:

amosnjoroge commented 2 years ago

Hey @amosnjoroge, I noticed in the select component:

  • groupOptions, I can't seem to see more than warm and cold options but I see there are options under each that arent displayed unless you enabled grouped = true. Can we add any inline comments on the story itself to explain this? Or if storybook has a way to add comments next to each control?

You are right, the groupOptions requires the grouped prop to equal true. I was looking for a way to either disable the options or let the options be dynamic based on the grouped flag but I have not figure it out. I will check it if is possible to add documentation on the prop for now

andrewtpham commented 2 years ago

@amosnjoroge that sounds good. If you can't find any way to add documentation to the prop, maybe we add a line comment in the story template (definitely not as nice): image

amosnjoroge commented 2 years ago

@andrewtpham I have added a description to the sample options control. You have to be in the Docs tab to see the description. Please check it and inform me if the description is clear.

FYI the description field supports Markdown text.

image

ninetteadhikari commented 2 years ago

@amosnjoroge to upgrade version and then its ready to be merged