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

Params to allow classes for govuk-form-group #1042

Closed
web-bert opened this issue Oct 25, 2018 · 4 comments
Closed

Params to allow classes for govuk-form-group #1042

web-bert opened this issue Oct 25, 2018 · 4 comments
Labels
feature request User requests a new feature

Comments

@web-bert
Copy link
Contributor

When using the govukSelect macro it would be nice to have a param for adding classes to the govuk-form-group

I am working on a design where we want to add a background colour to the select and label, rather than having to add a wrapping element or use a generic selector, it would be good to be able to target the form group specifically.

I would suggest:

  {{ govukSelect({
    group: {
      classes: 'my-custom-class'
    }
  }) }}

I am not sure if there are other macros that could use the same treatment...

@kr8n3r
Copy link

kr8n3r commented Oct 26, 2018

Hi @web-bert, thanks for raising this. A while ago we had a similar issue open, but closed it due to lack of interest. However, what you're describing has recently been mentioned, so we're going to discuss this as a team early next week.

We will update the this issue to let you know of the outcome.

@kr8n3r kr8n3r added the feature request User requests a new feature label Oct 26, 2018
@web-bert
Copy link
Contributor Author

Ok great. Happy to raise a PR if you can give some guidance on the components affected and the desired param names etc

@kr8n3r
Copy link

kr8n3r commented Nov 1, 2018

Hi @web-bert,
we've decided to go with a similar syntax as you outlined above in #1043

We opted for

formGroup: { 
   classes: ''
} 

I'd imagine Select, file upload, input, textarea and date input would be candidates as they all contain the form group wrapper.

You can have a look in the linked radios and checkboxes work to see how we now declare macro params(options). I don't think these examples need to be in the review app or readme files.

I'd suggest a single PR per component for easier review, but also opened to a single PR for all components with meaningful commits that will make it a bit easier to follow.

@kr8n3r
Copy link

kr8n3r commented Nov 7, 2018

addressed by #1059

@kr8n3r kr8n3r closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request User requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants