1.0.7 • Published 2 years ago

@patrik-alexits/alert-webcomponent v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@patrik-alexits/alert-webcomponent

Experimental Hybrids.js-based Web Component for an "alert" functionality. This component allows the creation of customised alerts.

Installation

To install this component, use the following command:

npm install @patrik-alexits/alert-webcomponent

Usage

The component only works if the parent of the component in the DOM is the document.body. First, import the component in your JavaScript or TypeScript file:

import '@patrik-alexits/alert-webcomponent';

You can then use the component in your HTML:

<app-alert
    type="warning"
    text="The app is still in development, some features might not work"
    dismissable="true"
    duration="2000">
</app-alert>

Interface "IAlert"

The component provides the following interface for customizing its content:

  • type: string: Defines the look of the component.
  • text: string: The text of the component to be displayed.
  • dismissable?: string | boolean: Optional. Sets the duration of the component to be displayed.
  • duration?: string | number: Optional. Sets the duration of the dismissable option in milliseconds.

License

This project is ISC licensed.

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago