hotosm / ui

Shared UI components with HOT theming
GNU Affero General Public License v3.0
7 stars 2 forks source link

Change docs, storybook for disabled button #19

Closed emi420 closed 7 months ago

emi420 commented 7 months ago

For the disabled Button the correct way to use the property is:

<hot-button disabled>

Instead of:

<hot-button disabled="true">

Because anything inside the argument's value will result in a "True" value (because it's a string).

I modified the README.md file with this change and also added the property to the component's story, because it wasn't working when using the "disabled" switch.

JoltCode commented 7 months ago

Ah perfect, thanks Emi! LGTM! 👍

spwoodcock commented 7 months ago

Nice, thanks!

I think you might have autoformatting turned on in your IDE by the way - watch out it doesn't conflict with the configured pre-commit hooks.

To keep consistent, install the pre-commit hooks:

pip install pre-commit
pre-commit install
emi420 commented 7 months ago

Oh yes @spwoodcock I might be the case! , for the .github/ISSUE_TEMPLATE/feature_request.md file I made the change manually because the test was failing. But for the tsconfig.json it was changed automatically.