mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore: complete first pass of apply jsdoc annotations to component props
This commit is contained in:
parent
566a281d81
commit
f30755b237
97 changed files with 2327 additions and 259 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue