diff --git a/packages/html/ds/src/file-upload/file-upload.html b/packages/html/ds/src/file-upload/file-upload.html index b92812f5e..3635addb8 100644 --- a/packages/html/ds/src/file-upload/file-upload.html +++ b/packages/html/ds/src/file-upload/file-upload.html @@ -3,7 +3,12 @@ {% from 'hint-text/hint-text.html' import govieHintText %} {% from 'error-text/error-text.html' import govieErrorText %} {% set isError = props.error and props.error.content %} + {% set isHint = props.hint and props.hint.content %} {% set inputId = props.id or 'file-upload-id' %} + {% set marginTop = '' %} + {% if props.error and props.hint %} + {% set marginTop = 'gi-mt-1' %} + {% endif %} {# Conditionally render the wrapper div only if error content is available #} {# prettier-ignore-start #} @@ -24,7 +29,7 @@ }} {% endif %} - {% if props.hint %} + {% if isHint %} {{ govieHintText({ "content": props.hint.content, @@ -44,7 +49,7 @@ {{ props.content | safe | trim | indent(2) }}
diff --git a/packages/html/ds/src/select/select.html b/packages/html/ds/src/select/select.html index 276f11b5d..84667c289 100644 --- a/packages/html/ds/src/select/select.html +++ b/packages/html/ds/src/select/select.html @@ -4,6 +4,12 @@ {% macro govieSelect(props) %} {% set ariaLabel = props.label.content or props.id %} + {% set isError = props.error and props.error.content %} + {% set isHint = props.hint and props.hint.content %} + {% set marginTop = '' %} + {% if props.error and props.hint %} + {% set marginTop = 'gi-mt-1' %} + {% endif %}