alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.17k stars 320 forks source link

[Descoped for now] Allow to initialise multiple components in a single call #5215

Open romaricpascal opened 1 month ago

romaricpascal commented 1 month ago

What

Allow services to initialise multiple components, both ours and theirs, in a single call and with the possibility to provide configuration for each type of component (similarly to initAll).

Hopefully, we can shape createAll to handle both a single component and multiple ones, but we could decide to go with a different function if typing or implementation becomes too complex.

Why

This would reduce boilerplate when initialising multiple components

Who needs to work on this

Developers

Who needs to review this

Developers

Done when