メインコンテンツまでスキップ
バージョン: 1.0.5

Notification

Overview

Notification は、ポップアップの通知を表示します。


Specification

Property

使用できるプロパティの一覧です。プロパティを指定して値を更新することができます。

NameTypeDefaultDescriptionRemark
classNamestring""コンポーネントの class 名
textstring""表示するテキスト
typestring"danger"背景色以下を指定できる
"danger" : Red(#e74c3c)
"info" : Blue(#3498db)
"success" : Green(#91c36c)

Constructor

Notification(options)
使用できるコンストラクタの一覧です。

Parameter

NameTypeDefaultDescriptionRemark
optionsobject{}コンポーネントのプロパティを含むオブジェクト

Method

使用できるメソッドの一覧です。

open()

Notification を表示する

Parameter

none

Return

none

close()

Notification を非表示にする

Parameter

none

Return

none


Sample Code

全てのパラメータを指定した場合のサンプルコードです。

const notification = new Kuc.Notification({
text: 'Error occurred!',
type: 'danger',
className: 'options-class'
});
notification.open();
notification.close();