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

Feature Request: Class attribute on AuToggleSwitch component #387

Open
lagartoverde opened this issue Mar 13, 2023 · 1 comment
Open

Feature Request: Class attribute on AuToggleSwitch component #387

lagartoverde opened this issue Mar 13, 2023 · 1 comment
Labels
enhancement Used when the PR adds a new feature or enhancement.

Comments

@lagartoverde
Copy link
Contributor

lagartoverde commented Mar 13, 2023

Is your feature request related to a problem? Please describe the use case and problem it solves.
I was using the AuToggleSwitch component and I need to add padding to it, it would be good to have a class attribute in the component that adds some classes to the wrapper of the component instead of having to add another wrapper around

Describe the solution you'd like

    <AuToggleSwitch
      @label={{t "article-structure-plugin.remove.content"}}
      @checked={{this.removeStructureContent}}
      @onChange={{this.setRemoveStructureContent}}
      @class="au-u-padding-tiny"
    />

instead of

<div class="au-u-padding-tiny">
  <AuToggleSwitch
    @label={{t "article-structure-plugin.remove.content"}}
    @checked={{this.removeStructureContent}}
    @onChange={{this.setRemoveStructureContent}}
   />
</div>

Which project(s) or feature(s) is this related to
In this case we are using it in GN, but it's applicable to other projects

@lagartoverde lagartoverde added the enhancement Used when the PR adds a new feature or enhancement. label Mar 13, 2023
@Windvis
Copy link
Contributor

Windvis commented Oct 10, 2023

Yea, that would work, but I feel the underlying issue is that we apply the ...attributes to the input instead of the most outer element. Maybe we should just apply the attributes to the label in the v3 release? I wonder how often we pass attributes to the input in projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Used when the PR adds a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants