chore: complete first pass of apply jsdoc annotations to component props

This commit is contained in:
Eric Liu 2020-07-26 17:42:12 -07:00
commit f30755b237
97 changed files with 2327 additions and 259 deletions

View file

@ -1,4 +1,8 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
*/
export let notificationType = "inline";
/**
@ -6,13 +10,43 @@
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"} [kind="error"]
*/
export let kind = "error";
export let role = "alert";
export let title = "provide a title";
export let subtitle = "";
export let iconDescription = "closes notification";
/**
* Set to `true` to use the low contrast variant
* @type {boolean} [lowContrast=false]
*/
export let lowContrast = false;
/**
* Set the `role` attribute
* @type {string} [role="alert"]
*/
export let role = "alert";
/**
* Specify the title text
* @type {string} [title="Title"]
*/
export let title = "Title";
/**
* Specify the subtitle text
* @type {string} [subtitle=""]
*/
export let subtitle = "";
/**
* Set to `true` to hide the close button
* @type {boolean} [hideCloseButton=false]
*/
export let hideCloseButton = false;
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Closes notification"]
*/
export let iconDescription = "Closes notification";
import { createEventDispatcher } from "svelte";
import NotificationIcon from "./NotificationIcon.svelte";
import NotificationTextDetails from "./NotificationTextDetails.svelte";