Class NotificationBanner

Notification Banner component

Hierarchy (view full)

Constructors

Properties

_$root: HTMLElement
defaults: NotificationBannerConfig = ...

Notification banner default config

elementType: (new () => Element) = HTMLElement
moduleName: string = 'govuk-notification-banner'

Name for the component used when initialising using data-module attributes.

schema: Readonly<{
    properties: {
        disableAutoFocus: {
            type: "boolean";
        };
    };
}> = ...

Notification banner config schema

Accessors

Methods

  • Internal Virtual

    configOverride

    Function which defines configuration overrides to prioritize properties from the root element's dataset.

    It should take a subset of configuration as input and return a new configuration object with properties that should be overridden based on the root element's dataset. A Symbol is used for indexing to prevent conflicts.

    Parameters

    Returns ObjectNested

    return - Configuration object