|
103 | 103 |
|
104 | 104 | The hero macro takes the following arguments:
|
105 | 105 |
|
106 |
| -| Name | Type | Required | Description | |
107 |
| -| ------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------- | |
108 |
| -| **heading** | string | No | Text heading of the hero component. If `headingHtml` is provided, the `heading` argument will be ignored. | |
109 |
| -| **headingHtml** | string | No | HTML heading of the hero component. If `headingHtml` is provided, the `heading` argument will be ignored. | |
110 |
| -| **headingClasses** | string | No | Optional additional classes to add to heading. Separate each class with a space. | |
111 |
| -| **headingLevel** | integer | No | Optional heading level for the heading. Default: `1` | |
112 |
| -| **text** | string | No | Text content of the hero component. If `html` is provided, the `text` argument will be ignored. | |
113 |
| -| **html** | string | No | HTML content of the hero component. If `html` is provided, the `text` argument will be ignored. | |
114 |
| -| **imageURL** | string | No | URL of the image of the hero component. | |
115 |
| -| **classes** | string | No | Optional additional classes to add to the hero container. Separate each class with a space. | |
116 |
| -| **attributes** | object | No | Any extra HTML attributes (for example data attributes) to add to the hero container. | |
| 106 | +| Name | Type | Required | Description | |
| 107 | +| ------------------ | -------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 108 | +| **heading** | string | No | Text heading of the hero component | |
| 109 | +| **headingClasses** | string | No | Optional additional classes to add to heading. Separate each class with a space. | |
| 110 | +| **headingLevel** | integer | No | Optional heading level for the heading. Default: `1` | |
| 111 | +| **text** | string | No | Text content of the hero component. If `html` is provided, the `text` argument will be ignored. | |
| 112 | +| **html** | string | No | HTML content of the hero component. If `html` is provided, the `text` argument will be ignored. | |
| 113 | +| **caller** | nunjucks-block | No | Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire hero component in a `call` block. | |
| 114 | +| **imageURL** | string | No | URL of the image of the hero component. | |
| 115 | +| **classes** | string | No | Optional additional classes to add to the hero container. Separate each class with a space. | |
| 116 | +| **attributes** | object | No | Any extra HTML attributes (for example data attributes) to add to the hero container. | |
117 | 117 |
|
118 | 118 | If you are using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `html` can be a [security risk](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting). Read more about this in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).
|
0 commit comments