Skip to content

Commit

Permalink
Change entry point to components
Browse files Browse the repository at this point in the history
Some components in nhsuk-frontend now inherit nhsukAttributes, a macro that exists in a sibling folder to the components folder.
  • Loading branch information
paulrobertlloyd committed Sep 19, 2024
1 parent 926cb9e commit 49c0307
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/lib/decorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { decorate } = require('../../lib/decorate.js')

const env = nunjucks.configure([
'./',
'./node_modules/nhsuk-frontend/packages/components',
'./node_modules/nhsuk-frontend/packages',
'./test/fixtures'
])
env.addGlobal('decorate', decorate)
Expand Down
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/button/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "button/macro.njk" import button as source -%}
{% from "components/button/macro.njk" import button as source -%}
{%- macro button(params) -%}
{{- source(params) if params.href else source(decorate(params, params.decorate)) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/checkboxes/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "checkboxes/macro.njk" import checkboxes as source -%}
{% from "components/checkboxes/macro.njk" import checkboxes as source -%}
{%- macro checkboxes(params) -%}
{{- source(decorate(params, params.decorate)) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/date-input/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "date-input/macro.njk" import dateInput as source -%}
{% from "components/date-input/macro.njk" import dateInput as source -%}
{%- macro dateInput(params) -%}
{{- source(decorate(params, params.decorate, "dateInput")) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/input/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "input/macro.njk" import input as source %}
{% from "components/input/macro.njk" import input as source %}
{%- macro input(params) -%}
{{- source(decorate(params, params.decorate)) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/radios/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "radios/macro.njk" import radios as source -%}
{% from "components/radios/macro.njk" import radios as source -%}
{%- macro radios(params) -%}
{{- source(decorate(params, params.decorate)) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/select/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "select/macro.njk" import select as source -%}
{% from "components/select/macro.njk" import select as source -%}
{%- macro select(params) -%}
{{- source(decorate(params, params.decorate)) -}}
{%- endmacro %}
2 changes: 1 addition & 1 deletion x-nhsuk/decorated/textarea/macro.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "textarea/macro.njk" import textarea as source -%}
{% from "components/textarea/macro.njk" import textarea as source -%}
{%- macro textarea(params) -%}
{{- source(decorate(params, params.decorate)) -}}
{%- endmacro %}

0 comments on commit 49c0307

Please sign in to comment.