Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support labels on Toggle component #40

Closed
mnicole opened this issue Sep 18, 2018 · 5 comments
Closed

Support labels on Toggle component #40

mnicole opened this issue Sep 18, 2018 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest

Comments

@mnicole
Copy link
Collaborator

mnicole commented Sep 18, 2018

Sometimes the toggle component is unclear, so having labels is easier for the user to understand, for example "on" and "off" or "yes" and "no".

We should add support for these labels in the Toggle component.

<span className="gds-form-group__toggleswitch-indicator-labels" gg-enabled-text={onText} gg-disabled-text={offText}></span>

@mnicole mnicole added enhancement New feature or request good first issue Good for newcomers labels Sep 18, 2018
@asifsha
Copy link
Contributor

asifsha commented Oct 5, 2018

I can have a look on this

@edrpls
Copy link

edrpls commented Oct 5, 2018

Thanks @asifsha!

@mnicole
Copy link
Collaborator Author

mnicole commented Oct 5, 2018

thank you @asifsha! we have a contributing guide and git guide:

https://github.com/gumgum/gumdrops/blob/master/CONTRIBUTING.md
https://github.com/gumgum/gumdrops/blob/master/GITWORKFLOW.md

please let us know if you have any questions!

@asifsha
Copy link
Contributor

asifsha commented Oct 6, 2018

Thanks for the response,
I cannot find the theme-blue.css in repository, I downloaded it from https://assets.ggops.com/stable/theme-blue.css, and the CSS class "gds-form-group__toggleswitch-indicator-labels" is already defined. If I am applying that class, right now the layout is not correct. Do I need to fix the CSS class to correct the layout or just need to adjust it in Toggle.jsx?

@mnicole
Copy link
Collaborator Author

mnicole commented Oct 7, 2018

hi @asifsha , you shouldn't need the css if you build the project locally because we have a setting in the .storybook folder that imports the css file there. you can clone the project and then run yarn and yarn install and go to http://localhost:6006/ to see the storybook.

the sample code in the ticket description should be placed inside the <span className="gds-form-group__toggleswitch-indicator"> tag in the components/molecules/Toggle. sorry i was originally unclear about the placement. thanks!

asifsha added a commit to asifsha/gumdrops that referenced this issue Oct 7, 2018
asifsha added a commit to asifsha/gumdrops that referenced this issue Oct 9, 2018
asifsha added a commit to asifsha/gumdrops that referenced this issue Oct 11, 2018
gumgum#40 support labels on toggle component - toggle readme updated
asifsha added a commit to asifsha/gumdrops that referenced this issue Oct 15, 2018
jscottsmith pushed a commit that referenced this issue Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants