UNPKG

carbon-components-angular

Version:
1,216 lines (1,074 loc) 95.4 kB
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>carbon-components-angular documentation</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="../images/favicon.ico"> <link rel="stylesheet" href="../styles/style.css"> <link rel="stylesheet" href="../styles/dark.css"> <style> footer.carbon { position: absolute; bottom: 0; width: 100%; z-index: 9999; } #root > div { /* * Subtracting the height of the footer to prevent * overlaying the footer ontop of content */ height: calc(100vh - 48px); } </style> </head> <body> <script> // Blocking script to avoid flickering dark mode // Dark mode toggle button var useDark = window.matchMedia('(prefers-color-scheme: dark)'); var darkModeState = useDark.matches; var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input'); var $darkModeToggles = document.querySelectorAll('.dark-mode-switch'); var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state'); function checkToggle(check) { for (var i = 0; i < $darkModeToggleSwitchers.length; i++) { $darkModeToggleSwitchers[i].checked = check; } } function toggleDarkMode(state) { if (window.localStorage) { localStorage.setItem('compodoc_darkmode-state', state); } checkToggle(state); const hasClass = document.body.classList.contains('dark'); if (state) { for (var i = 0; i < $darkModeToggles.length; i++) { $darkModeToggles[i].classList.add('dark'); } if (!hasClass) { document.body.classList.add('dark'); } } else { for (var i = 0; i < $darkModeToggles.length; i++) { $darkModeToggles[i].classList.remove('dark'); } if (hasClass) { document.body.classList.remove('dark'); } } } useDark.addEventListener('change', function (evt) { toggleDarkMode(evt.matches); }); if (darkModeStateLocal) { darkModeState = darkModeStateLocal === 'true'; } toggleDarkMode(darkModeState); </script> <div class="navbar navbar-default navbar-fixed-top d-md-none p-0"> <div class="d-flex"> <a href="../" class="navbar-brand">carbon-components-angular documentation</a> <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button> </div> </div> <div class="xs-menu menu" id="mobile-menu"> <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu> </div> <div class="container-fluid main"> <div class="row main"> <div class="d-none d-md-block menu"> <compodoc-menu mode="normal"></compodoc-menu> </div> <!-- START CONTENT --> <div class="content component"> <div class="content-data"> <ol class="breadcrumb"> <li class="breadcrumb-item">Components</li> <li class="breadcrumb-item" > ActionableNotification</li> </ol> <ul class="nav nav-tabs" role="tablist"> <li class="nav-item"> <a href="#info" class="nav-link active" role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a> </li> <li class="nav-item"> <a href="#source" class="nav-link" role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a> </li> <li class="nav-item"> <a href="#tree" class="nav-link" role="tab" id="tree-tab" data-bs-toggle="tab" data-link="dom-tree">DOM Tree</a> </li> </ul> <div class="tab-content"> <div class="tab-pane fade active in" id="info"><p class="comment"> <h3>File</h3> </p> <p class="comment"> <code>src/notification/actionable-notification.component.ts</code> </p> <p class="comment"> <h3>Description</h3> </p> <p class="comment"> <p>Actionable notification allows for interactive elements within a notification. There are two variants offered, inline &amp; toast.</p> <p><a href="../../?path=/story/components-notification--actionable-notification">See demo</a></p> </p> <p class="comment"> <h3>Extends</h3> </p> <p class="comment"> <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </p> <section data-compodoc="block-metadata"> <h3>Metadata</h3> <table class="table table-sm table-hover metadata"> <tbody> <tr> <td class="col-md-3">selector</td> <td class="col-md-9"><code>cds-actionable-notification, ibm-actionable-notification</code></td> </tr> <tr> <td class="col-md-3">template</td> <td class="col-md-9"><pre class="line-numbers"><code class="language-html">&lt;div class&#x3D;&quot;cds--actionable-notification__details&quot;&gt; &lt;svg [cdsIcon]&#x3D;&quot;iconDictionary[notificationObj.type]&quot; size&#x3D;&quot;20&quot; *ngIf&#x3D;&quot;notificationObj.type&quot; [ngClass]&#x3D;&quot;{ &#x27;cds--inline-notification__icon&#x27;: notificationObj.variant &#x3D;&#x3D;&#x3D; &#x27;inline&#x27;, &#x27;cds--toast-notification__icon&#x27;: notificationObj.variant &#x3D;&#x3D;&#x3D; &#x27;toast&#x27; }&quot; class&#x3D;&quot;cds--actionable-notification__icon&quot;&gt; &lt;/svg&gt; &lt;div class&#x3D;&quot;cds--actionable-notification__text-wrapper&quot;&gt; &lt;div class&#x3D;&quot;cds--actionable-notification__content&quot;&gt; &lt;div cdsActionableTitle *ngIf&#x3D;&quot;!notificationObj.template&quot; [id]&#x3D;&quot;notificationID&quot; [innerHTML]&#x3D;&quot;notificationObj.title&quot;&gt; &lt;/div&gt; &lt;div *ngIf&#x3D;&quot;!notificationObj.template&quot; cdsActionableSubtitle&gt; &lt;span [innerHTML]&#x3D;&quot;notificationObj.message&quot;&gt;&lt;/span&gt; &lt;ng-container *ngFor&#x3D;&quot;let link of notificationObj.links&quot;&gt; &lt;a cdsLink [href]&#x3D;&quot;link.href&quot;&gt;{{link.text}}&lt;/a&gt; &lt;/ng-container&gt; &lt;/div&gt; &lt;ng-container *ngTemplateOutlet&#x3D;&quot;notificationObj.template; context: { $implicit: notificationObj }&quot;&gt;&lt;/ng-container&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;ng-container *ngIf&#x3D;&quot;!notificationObj.actionsTemplate&quot;&gt; &lt;button *ngFor&#x3D;&quot;let action of notificationObj.actions&quot; (click)&#x3D;&quot;onClick(action, $event)&quot; [cdsButton]&#x3D;&quot;notificationObj.variant &#x3D;&#x3D;&#x3D; &#x27;inline&#x27; ? &#x27;ghost&#x27; : &#x27;tertiary&#x27;&quot; size&#x3D;&quot;sm&quot; cdsActionableButton&gt; {{action.text}} &lt;/button&gt; &lt;/ng-container&gt; &lt;ng-container *ngTemplateOutlet&#x3D;&quot;notificationObj.actionsTemplate; context: { $implicit: notificationObj }&quot;&gt;&lt;/ng-container&gt; &lt;button *ngIf&#x3D;&quot;!isCloseHidden&quot; (click)&#x3D;&quot;onClose()&quot; class&#x3D;&quot;cds--actionable-notification__close-button&quot; [attr.aria-label]&#x3D;&quot;notificationObj.closeLabel | async&quot; type&#x3D;&quot;button&quot;&gt; &lt;svg cdsIcon&#x3D;&quot;close&quot; size&#x3D;&quot;16&quot; class&#x3D;&quot;cds--actionable-notification__close-icon&quot;&gt;&lt;/svg&gt; &lt;/button&gt; </code></pre></td> </tr> </tbody> </table> </section> <section data-compodoc="block-index"> <h3 id="index">Index</h3> <table class="table table-sm table-bordered index-table"> <tbody> <tr> <td class="col-md-4"> <h6><b>Properties</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#defaultNotificationObj" >defaultNotificationObj</a> </li> <li> <span class="modifier"></span> <a href="#notificationClass" >notificationClass</a> </li> <li> <span class="modifier">Private</span> <span class="modifier">Static</span> <a href="#notificationCount" >notificationCount</a> </li> <li> <a href="#notificationID" >notificationID</a> </li> <li> <span class="modifier"></span> <a href="#notificationLabel" >notificationLabel</a> </li> <li> <span class="modifier">Protected</span> <a href="#_notificationObj" >_notificationObj</a> </li> <li> <a href="#componentRef" >componentRef</a> </li> <li> <span class="modifier">Readonly</span> <a href="#iconDictionary" >iconDictionary</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Methods</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#destroy" >destroy</a> </li> <li> <a href="#onClick" >onClick</a> </li> <li> <a href="#onClose" >onClose</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Inputs</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#notificationObj" >notificationObj</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Outputs</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#close" >close</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>HostBindings</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#attr.aria-labelledBy" >attr.aria-labelledBy</a> </li> <li> <a href="#class.cds--actionable-notification" >class.cds--actionable-notification</a> </li> <li> <a href="#class.cds--actionable-notification--error" >class.cds--actionable-notification--error</a> </li> <li> <a href="#class.cds--actionable-notification--hide-close-button" >class.cds--actionable-notification--hide-close-button</a> </li> <li> <a href="#class.cds--actionable-notification--info" >class.cds--actionable-notification--info</a> </li> <li> <a href="#class.cds--actionable-notification--info-square" >class.cds--actionable-notification--info-square</a> </li> <li> <a href="#class.cds--actionable-notification--low-contrast" >class.cds--actionable-notification--low-contrast</a> </li> <li> <a href="#class.cds--actionable-notification--success" >class.cds--actionable-notification--success</a> </li> <li> <a href="#class.cds--actionable-notification--toast" >class.cds--actionable-notification--toast</a> </li> <li> <a href="#class.cds--actionable-notification--warning" >class.cds--actionable-notification--warning</a> </li> <li> <a href="#class.cds--actionable-notification--warning-alt" >class.cds--actionable-notification--warning-alt</a> </li> <li> <a href="#attr.role" >attr.role</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Accessors</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#notificationObj" >notificationObj</a> </li> <li> <a href="#toastVariant" >toastVariant</a> </li> <li> <a href="#isError" >isError</a> </li> <li> <a href="#isInfo" >isInfo</a> </li> <li> <a href="#isInfoSquare" >isInfoSquare</a> </li> <li> <a href="#isSuccess" >isSuccess</a> </li> <li> <a href="#isWarning" >isWarning</a> </li> <li> <a href="#isWarningAlt" >isWarningAlt</a> </li> <li> <a href="#isLowContrast" >isLowContrast</a> </li> <li> <a href="#isCloseHidden" >isCloseHidden</a> </li> </ul> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-constructor"> <h3 id="constructor">Constructor</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <code>constructor(notificationDisplayService: <a href="../injectables/NotificationDisplayService.html" target="_self">NotificationDisplayService</a>, i18n: <a href="../injectables/I18n.html" target="_self">I18n</a>)</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="110" class="link-to-prism">src/notification/actionable-notification.component.ts:110</a></div> </td> </tr> <tr> <td class="col-md-4"> <div> <b>Parameters :</b> <table class="params"> <thead> <tr> <td>Name</td> <td>Type</td> <td>Optional</td> </tr> </thead> <tbody> <tr> <td>notificationDisplayService</td> <td> <code><a href="../injectables/NotificationDisplayService.html" target="_self" >NotificationDisplayService</a></code> </td> <td> No </td> </tr> <tr> <td>i18n</td> <td> <code><a href="../injectables/I18n.html" target="_self" >I18n</a></code> </td> <td> No </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-inputs"> <h3 id="inputs">Inputs</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="notificationObj"></a> <b>notificationObj</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="../interfaces/ActionableContent.html" target="_self" >ActionableContent</a></code> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <a href="" data-line="80" class="link-to-prism">src/notification/actionable-notification.component.ts:80</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Can have <code>type</code>, <code>title</code>, and <code>message</code> members.</p> <p><code>type</code> can be one of <code>&quot;error&quot;</code>, <code>&quot;info&quot;</code>, <code>&quot;info-square&quot;</code>, <code>&quot;warning&quot;</code>, <code>&quot;warning-alt&quot;</code>, or <code>&quot;success&quot;</code></p> <p><code>message</code> is the message to display</p> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-outputs"> <h3 id="outputs">Outputs</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="close"></a> <b>close</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>EventEmitter&lt;any&gt;</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:41</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Emits on close.</p> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-properties"> <h3>HostBindings</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="attr.aria-labelledBy"></a> <span class="name"> <span ><b>attr.aria-labelledBy</b></span> <a href="#attr.aria-labelledBy"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>this.notificationID</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="91" class="link-to-prism">src/notification/actionable-notification.component.ts:91</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification"></a> <span class="name"> <span ><b>class.cds--actionable-notification</b></span> <a href="#class.cds--actionable-notification"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>true</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="92" class="link-to-prism">src/notification/actionable-notification.component.ts:92</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--error"></a> <span class="name"> <span ><b>class.cds--actionable-notification--error</b></span> <a href="#class.cds--actionable-notification--error"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="94" class="link-to-prism">src/notification/actionable-notification.component.ts:94</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--hide-close-button"></a> <span class="name"> <span ><b>class.cds--actionable-notification--hide-close-button</b></span> <a href="#class.cds--actionable-notification--hide-close-button"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="101" class="link-to-prism">src/notification/actionable-notification.component.ts:101</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--info"></a> <span class="name"> <span ><b>class.cds--actionable-notification--info</b></span> <a href="#class.cds--actionable-notification--info"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="95" class="link-to-prism">src/notification/actionable-notification.component.ts:95</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--info-square"></a> <span class="name"> <span ><b>class.cds--actionable-notification--info-square</b></span> <a href="#class.cds--actionable-notification--info-square"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="96" class="link-to-prism">src/notification/actionable-notification.component.ts:96</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--low-contrast"></a> <span class="name"> <span ><b>class.cds--actionable-notification--low-contrast</b></span> <a href="#class.cds--actionable-notification--low-contrast"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="100" class="link-to-prism">src/notification/actionable-notification.component.ts:100</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--success"></a> <span class="name"> <span ><b>class.cds--actionable-notification--success</b></span> <a href="#class.cds--actionable-notification--success"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="97" class="link-to-prism">src/notification/actionable-notification.component.ts:97</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--toast"></a> <span class="name"> <span ><b>class.cds--actionable-notification--toast</b></span> <a href="#class.cds--actionable-notification--toast"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="93" class="link-to-prism">src/notification/actionable-notification.component.ts:93</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--warning"></a> <span class="name"> <span ><b>class.cds--actionable-notification--warning</b></span> <a href="#class.cds--actionable-notification--warning"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="98" class="link-to-prism">src/notification/actionable-notification.component.ts:98</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--actionable-notification--warning-alt"></a> <span class="name"> <span ><b>class.cds--actionable-notification--warning-alt</b></span> <a href="#class.cds--actionable-notification--warning-alt"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="99" class="link-to-prism">src/notification/actionable-notification.component.ts:99</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="attr.role"></a> <span class="name"> <span ><b>attr.role</b></span> <a href="#attr.role"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:34</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set role attribute for component <code>Status</code> is default for inline-notification &amp; toast component <code>alertdialog</code> is default for actionable-notification</p> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-methods"> <h3 id="methods"> Methods </h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="destroy"></a> <span class="name"> <span ><b>destroy</b></span> <a href="#destroy"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <code>destroy()</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:90</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"> <b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="onClick"></a> <span class="name"> <span ><b>onClick</b></span> <a href="#onClick"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <code>onClick(action, event)</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:79</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"> <b>Parameters :</b> <table class="params"> <thead> <tr> <td>Name</td> <td>Optional</td> </tr> </thead> <tbody> <tr> <td>action</td> <td> No </td> </tr> <tr> <td>event</td> <td> No </td> </tr> </tbody> </table> </div> <div class="io-description"> <b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code> </div> <div class="io-description"> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="onClose"></a> <span class="name"> <span ><b>onClose</b></span> <a href="#onClose"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <code>onClose()</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:75</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Emits close event.</p> </div> <div class="io-description"> <b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-properties"> <h3 id="inputs"> Properties </h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="defaultNotificationObj"></a> <span class="name"> <span ><b>defaultNotificationObj</b></span> <a href="#defaultNotificationObj"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object" target="_blank" >object</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>{ ...this.defaultNotificationObj, variant: &quot;inline&quot; as NotificationVariants, role: &quot;alertdialog&quot; }</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Inherited from <code><a href="../components/BaseNotification.html" target="_self" >BaseNotification</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <code><a href="../components/BaseNotification.html#source" target="_self" >BaseNotification:106</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set default variant &amp; role, alternatives can be provided through notificationObj property</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="notificationClass"></a> <span class="name"> <span class="modifier"></span> <span ><b>notificationClass</b></span> <a href="#notificationClass"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>true</code> </td> </tr> <tr> <td class="col-md-4"> <b>Decorators : </b> <br /> <code> @HostBinding(&#x27;class.cds--actionable-notification&#x27;)<br /> </code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="92" class="link-to-prism">src/notification/actionable-notification.component.ts:92</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="notificationCount"></a> <span class="name"> <span class="modifier">Private</span> <span class="modifier">Static</span> <span ><b>notificationCount</b></span> <a href="#notificationCount"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>0</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="72" class="link-to-prism">src/notification/actionable-notification.component.ts:72</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="notificationID"></a> <span class="name"> <span ><b>notificationID</b></span> <a href="#notificationID"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>&#x60;actionable-notification-${ActionableNotification.notificationCount++}&#x60;</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="90"