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

@ -4,18 +4,31 @@
* @type {"toast" | "inline"} [notificationType="toast"]
*/
export let notificationType = "toast";
export let iconDescription = "close icon";
/**
* Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte/lib/Add16").default} [renderIcon]
*/
export let renderIcon = Close20;
/**
* Specify the title of the icon
*/
export let title = undefined;
export let type = "button";
/**
* Specify the ARIA label for the icon
* @type {string} [iconDescription="Close icon"]
*/
export let iconDescription = "Close icon";
import Close20 from "carbon-icons-svelte/lib/Close20";
</script>
<button
type="button"
aria-label={iconDescription}
title={iconDescription}
{type}
class:bx--toast-notification__close-button={notificationType === 'toast'}
class:bx--inline-notification__close-button={notificationType === 'inline'}
{...$$restProps}