|
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. | |
109 |
| -| **text** | string | No | Text content of the hero component. | |
110 |
| -| **imageURL** | string | No | URL of the image of the hero component. | |
111 |
| -| **classes** | string | No | Optional additional classes to add to the hero container. Separate each class with a space. | |
112 |
| -| **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. 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. | |
113 | 117 |
|
114 | 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