UNPKG

digitalmarketplace-frontend

Version:

Digital Marketplace Frontend contains assets and components used in Digital Marketplace projects

4 lines (2 loc) 960 B
# Alert Component The alert component is a container used to highlight important messages to the users about the results of their actions. There are three styles of alerts (success, error, notice) configured by the required `type` parameter. The macro also requires one of two string parameters (`titleText` or `titleHtml`) with the message to the users. For additional information either the `text` or the `html` parameters can be used, which will render with a smaller font than the title. The `titleHtml` and `html` parameters are rendered with the safe filter to allow flexibility to developers and designers, but also need to used only with sanitised inputs to avoid XSS attacks. The heading level of the title can be changed from 1-6 (default is 2) via the `headingLevel` parameter, but this won't affect the font's style. Finally, extra `classes` and `attributes` can be added to the containing div of the component by the two parameters of that name.