npm install
npm run serve
npm run build
npm run lint
<notification-banner>
takes the following attributes:
Url to connect notification-endpoint. Defaults to /NotificationPortlet/api/v2/notifications
.
<notification-banner
notification-api-url="/NotificationPortlet/api/v2/notifications"
></notification-banner>
Url to connect to oidc. The default for this value is /uPortal/api/v5-1/userinfo
.
<notification-banner user-info-api-url="/uPortal/api/v5-1/userinfo"></notification-banner>
Bootstrap variant of 'alert' component to style notification items. Default is 'info'. Can be set to 'custom' to add 'alert-custom' class which will allow styling according to theming section below.
<notification-banner notificationVariant="info"></notification-banner>
Icon displayed next to heading. Supports "info" and "exclamation-triangle" from Font Awesome.
<notification-banner notificationIcon="info"></notification-banner>
Icon size for Font Awesome icon displayed next to heading.
<notification-banner notificationIconSize="2x"></notification-banner>
Query string parameter to append to api call to retrieve notifications.
<notification-banner notificationIconSize="2x"></notification-banner>
Skips oidc call for api token.
<notification-banner debug></notification-banner>
Currently this component supports CSS Variables for overriding button colors. Defining the following variables will change the colors for the component accordingly. They will fall back to the colors described below.
You should define this in your custom stylesheet.
:root {
--notif-banner-heading-text-color: white; /* text color of notification item heading */
--notif-banner-body-text-color: white; /* text color of notification item body */
--notif-banner-bg-color: darkred; /* background color of notification items */
--notif-banner-border-color: darkred; /* border color of notification items */
--notif-banner-border-radius: 0; /* border radius of notification items */
--notif-banner-item-margin: 0 0 1px 0; /* margin between notification items */
--notif-banner-container-margin: 0; /* margin around notification item list */
}