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

Change html output? #3

Open
kevinkashou opened this issue Apr 4, 2018 · 2 comments
Open

Change html output? #3

kevinkashou opened this issue Apr 4, 2018 · 2 comments

Comments

@kevinkashou
Copy link

Is there a way where I can change the order of the HTML output for the checkbox and the value?

Right now it is currently:

<label class="visibility-label" for="visibility-toggle-26">
    <span class="visibility-value">Title</span>
    <input class="visibility-toggle" id="visibility-toggle-26" value="on" type="checkbox">
</label>

Is this what I would like instead:

<label class="visibility-label" for="visibility-toggle-26">
    <input class="visibility-toggle" id="visibility-toggle-26" value="on" type="checkbox">
    <span class="visibility-value">Title</span>
</label>
@bebraw
Copy link
Member

bebraw commented Apr 5, 2018

Unfortunately the order is fixed in the source. If you have time, you could decompose the component so that you could write something like this:

<VisibilityToggles ...>
  <VisibilityToggles.Toggle />
  <VisibilityToggles.Value />
</VisibilityToggles>

So you would have to extract some components and then consume the data through a context.

I can accept a PR for this.

@bebraw
Copy link
Member

bebraw commented Apr 7, 2018

Let's keep this open. I may want to get this done one day. 👍

@bebraw bebraw reopened this Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants