mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 00:48:24 -04:00
remove alert component
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
# Error message
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
|
|
||||||
|
|
||||||
## Guidance and Examples
|
|
||||||
|
|
||||||
Find out when to use the error message component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/error-message).
|
|
||||||
|
|
||||||
## Component options
|
|
||||||
|
|
||||||
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
|
|
||||||
|
|
||||||
See [options table](https://design-system.service.gov.uk/components/error-message/#options-example-default) for details.
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"name": "text",
|
|
||||||
"type": "string",
|
|
||||||
"required": true,
|
|
||||||
"description": "If `html` is set, this is not required. Text to use within the error message. If `html` is provided, the `text` argument will be ignored."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "html",
|
|
||||||
"type": "string",
|
|
||||||
"required": true,
|
|
||||||
"description": "If `text` is set, this is not required. HTML to use within the error message. If `html` is provided, the `text` argument will be ignored."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"type": "string",
|
|
||||||
"required": false,
|
|
||||||
"description": "Id attribute to add to the error message span tag."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "classes",
|
|
||||||
"type": "string",
|
|
||||||
"required": false,
|
|
||||||
"description": "Classes to add to the error message span tag."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "attributes",
|
|
||||||
"type": "object",
|
|
||||||
"required": false,
|
|
||||||
"description": "HTML attributes (for example data attributes) to add to the error message span tag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "visuallyHiddenText",
|
|
||||||
"type": "string",
|
|
||||||
"description": "A visually hidden prefix used before the error message. Defaults to \"Error\"."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{% macro usaAlert(params) %}
|
|
||||||
{%- include "./template.njk" -%}
|
|
||||||
{% endmacro %}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{%- if params.slim %}
|
|
||||||
<div class="usa-alert usa-alert--slim usa-alert--{{params.type}} {%- if params.classes %} {{ params.classes }}{% endif %}" {%- if params.id %} id="{{ params.id }}"{% endif %}>
|
|
||||||
<div class="usa-alert__body">
|
|
||||||
<p class="usa-alert__text">
|
|
||||||
{{params.text}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<div class="usa-alert usa-alert--{{params.type}} {%- if params.classes %} {{ params.classes }}{% endif %}" {%- if params.id %} id="{{ params.id }}"{% endif %}>
|
|
||||||
<div class="usa-alert__body">
|
|
||||||
<h{{params.header_level}} class="usa-alert__heading">{{params.heading}}</h{{params.header_level}}>
|
|
||||||
<p class="usa-alert__text">
|
|
||||||
{{params.text | safe }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
{% from "components/table.html" import mapping_table, row, field, text_field, index_field, hidden_field_heading %}
|
{% from "components/table.html" import mapping_table, row, field, text_field, index_field, hidden_field_heading %}
|
||||||
{% from "components/file-upload.html" import file_upload %}
|
{% from "components/file-upload.html" import file_upload %}
|
||||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||||
{% from "components/components/alert/macro.njk" import usaAlert %}
|
|
||||||
|
|
||||||
{% block service_page_title %}
|
{% block service_page_title %}
|
||||||
Error
|
Error
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
{% from "components/page-footer.html" import page_footer %}
|
{% from "components/page-footer.html" import page_footer %}
|
||||||
{% from "components/form.html" import form_wrapper %}
|
{% from "components/form.html" import form_wrapper %}
|
||||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||||
{% from "components/components/alert/macro.njk" import usaAlert %}
|
|
||||||
|
|
||||||
{% block service_page_title %}
|
{% block service_page_title %}
|
||||||
{{ heading_action }} text message template
|
{{ heading_action }} text message template
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
{% from "components/form.html" import form_wrapper %}
|
{% from "components/form.html" import form_wrapper %}
|
||||||
{% from "components/page-header.html" import page_header %}
|
{% from "components/page-header.html" import page_header %}
|
||||||
{% from "components/page-footer.html" import page_footer %}
|
{% from "components/page-footer.html" import page_footer %}
|
||||||
{% from "components/components/alert/macro.njk" import usaAlert %}
|
|
||||||
|
|
||||||
|
|
||||||
{% extends "withnav_template.html" %}
|
{% extends "withnav_template.html" %}
|
||||||
@@ -36,11 +35,13 @@
|
|||||||
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="{% if current_user.has_permissions('manage_templates') %} grid-col-10 {% else %} grid-col-12 {% endif %}">
|
<div class="{% if current_user.has_permissions('manage_templates') %} grid-col-10 {% else %} grid-col-12 {% endif %}">
|
||||||
{{ usaAlert({
|
<div class="usa-alert usa-alert--slim usa-alert--info">
|
||||||
"text": "Every message starts with a template. To send, choose or create a template.",
|
<div class="usa-alert__body">
|
||||||
"slim": true,
|
<p class="usa-alert__text">
|
||||||
"type": "info",
|
Every message starts with a template. To send, choose or create a template.
|
||||||
}) }}
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{ folder_path(
|
{{ folder_path(
|
||||||
folders=template_folder_path,
|
folders=template_folder_path,
|
||||||
service_id=current_service.id,
|
service_id=current_service.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user