Skip to content

widget.Alert #73

Description

@lindelwa122

widget.Alert

What are widgets

This is a new feature designed to make DomWizard even easier to use — just as originally intended. Widgets are pluggable, highly customizable, styled components that users can easily integrate into their projects. The goal is to speed up development while maintaining flexibility and control.

Alert

The Alert widget should create a pre-styled alert box used to display feedback messages such as warnings, errors, or success notifications. It must return a DomWizard element — nothing else should be returned.

Inputs

  • text: string — the message text displayed in the alert
  • type: string — defines the alert type (e.g., 'success', 'error', 'warning', 'info')
  • onClick: function (optional) — called when the alert is clicked
  • styles: object (optional) — allows overriding default alert styles

The type determines the colour scheme and iconography (for example, green for success, red for error, yellow for warning). User-provided styles should override the default styling. The Alert widget should be simple, responsive, and visually clear — ideal for showing contextual feedback to users.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions