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

Component specific branding #552

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Component specific branding #552

merged 3 commits into from
Sep 5, 2024

Conversation

peteryates
Copy link
Member

@peteryates peteryates commented Aug 23, 2024

There are some components in the GOV.UK Design System that don't appear in the NHS design system. Currently teams who want to use these components need to manually copy and adjust chunks of SCSS, replacing govuk for nhsuk - a laborious process.

We can make this a little easier by allowing the brand to be configured on a component-by-component basis, reducing the amount of custom styles needed.

The reason this approach was taken and not just passing in a brand override to each component is that there's no easy way of passing arguments through to the slots without converting them all to lambdas.

This will likely be a really niche feature.

Fixes #547

Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for govuk-components ready!

Name Link
🔨 Latest commit a31e241
🔍 Latest deploy log https://app.netlify.com/sites/govuk-components/deploys/66da10647dc40b0008412fcf
😎 Deploy Preview https://deploy-preview-552--govuk-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

There are some components in the GOV.UK Design System that don't appear
in the NHS design system. Currently teams who want to use these
components need to manually copy and adjust chunks of SCSS, replacing
`govuk` for `nhsuk` - a laborious process.

We can make this a little easier by allowing the brand to be configured
on a component-by-component basis, reducing the amount of custom styles
needed.

The reason this approach was taken and not just passing in a `brand`
override to each component is that there's no easy way of passing
arguments through to the slots without converting them all to
lambdas[0].

This will likely be a really niche feature.

[0] https://viewcomponent.org/guide/slots.html#lambda-slots
@peteryates peteryates force-pushed the component-specific-branding branch from 5d4c7ae to a31e241 Compare September 5, 2024 20:11
@peteryates peteryates added this pull request to the merge queue Sep 5, 2024
Merged via the queue into main with commit 22167a3 Sep 5, 2024
17 checks passed
@peteryates peteryates deleted the component-specific-branding branch September 5, 2024 20:18
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

Successfully merging this pull request may close these issues.

Allow brand to be configured on a per-component basis
1 participant