refactor: update/fix JSDoc props

This commit is contained in:
Eric Liu 2020-11-04 06:04:25 -08:00
commit d38e6d8be6
204 changed files with 992 additions and 2359 deletions

View file

@ -1,56 +1,35 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
* @type {"toast" | "inline"}
*/
export let notificationType = "inline";
/**
* Specify the kind of notification
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"} [kind="error"]
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"}
*/
export let kind = "error";
/**
* Set to `true` to use the low contrast variant
* @type {boolean} [lowContrast=false]
*/
/** Set to `true` to use the low contrast variant */
export let lowContrast = false;
/**
* Set the timeout duration (ms) to hide the notification after opening it
* @type {number} [timeout=0]
*/
/** Set the timeout duration (ms) to hide the notification after opening it */
export let timeout = 0;
/**
* Set the `role` attribute
* @type {string} [role="alert"]
*/
/** Set the `role` attribute */
export let role = "alert";
/**
* Specify the title text
* @type {string} [title="Title"]
*/
/** Specify the title text */
export let title = "Title";
/**
* Specify the subtitle text
* @type {string} [subtitle=""]
*/
/** Specify the subtitle text */
export let subtitle = "";
/**
* Set to `true` to hide the close button
* @type {boolean} [hideCloseButton=false]
*/
/** Set to `true` to hide the close button */
export let hideCloseButton = false;
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Closes notification"]
*/
/** Specify the ARIA label for the icon */
export let iconDescription = "Closes notification";
import { createEventDispatcher, onMount } from "svelte";

View file

@ -1,26 +1,23 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
* @type {"toast" | "inline"}
*/
export let notificationType = "toast";
/**
* Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} [renderIcon]
* @type {typeof import("carbon-icons-svelte/lib/Add16").default}
*/
export let renderIcon = Close20;
/**
* Specify the title of the icon
* @type {string} [title]
* @type {string}
*/
export let title = undefined;
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Close icon"]
*/
/** Specify the ARIA label for the icon */
export let iconDescription = "Close icon";
import Close20 from "carbon-icons-svelte/lib/Close20";

View file

@ -1,20 +1,17 @@
<script>
/**
* Specify the kind of notification icon
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"} [kind="error"]
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"}
*/
export let kind = "error";
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
* @type {"toast" | "inline"}
*/
export let notificationType = "toast";
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Closes notification"]
*/
/** Specify the ARIA label for the icon */
export let iconDescription = "Closes notification";
import CheckmarkFilled20 from "carbon-icons-svelte/lib/CheckmarkFilled20";

View file

@ -1,26 +1,17 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
* @type {"toast" | "inline"}
*/
export let notificationType = "toast";
/**
* Specify the title text
* @type {string} [title="Title"]
*/
/** Specify the title text */
export let title = "Title";
/**
* Specify the subtitle text
* @type {string} [subtitle=""]
*/
/** Specify the subtitle text */
export let subtitle = "";
/**
* Specify the caption text
* @type {string} [caption="Caption"]
*/
/** Specify the caption text */
export let caption = "Caption";
</script>

View file

@ -1,62 +1,38 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"} [notificationType="toast"]
* @type {"toast" | "inline"}
*/
export let notificationType = "toast";
/**
* Specify the kind of notification
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"} [kind="error"]
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"}
*/
export let kind = "error";
/**
* Set to `true` to use the low contrast variant
* @type {boolean} [lowContrast=false]
*/
/** Set to `true` to use the low contrast variant */
export let lowContrast = false;
/**
* Set the timeout duration (ms) to hide the notification after opening it
* @type {number} [timeout=0]
*/
/** Set the timeout duration (ms) to hide the notification after opening it */
export let timeout = 0;
/**
* Set the `role` attribute
* @type {string} [role="alert"]
*/
/** Set the `role` attribute */
export let role = "alert";
/**
* Specify the title text
* @type {string} [title="Title"]
*/
/** Specify the title text */
export let title = "Title";
/**
* Specify the subtitle text
* @type {string} [subtitle=""]
*/
/** Specify the subtitle text */
export let subtitle = "";
/**
* Specify the caption text
* @type {string} [caption="Caption"]
*/
/** Specify the caption text */
export let caption = "Caption";
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Closes notification"]
*/
/** Specify the ARIA label for the icon */
export let iconDescription = "Closes notification";
/**
* Set to `true` to hide the close button
* @type {boolean} [hideCloseButton=false]
*/
/** Set to `true` to hide the close button */
export let hideCloseButton = false;
import { createEventDispatcher, onMount } from "svelte";