chore: add more prop annotations

This commit is contained in:
Eric Liu 2020-07-25 06:26:49 -07:00
commit 773b18d314
75 changed files with 877 additions and 137 deletions

View file

@ -1,8 +1,32 @@
<script>
/**
* Define the tooltip text
* @types {string} [tooltipText=""]
*/
export let tooltipText = "";
export let align = "center"; // "start" | "center" | "end"
export let direction = "bottom"; // "top" | "right" | "bottom" | "left"
/**
* Set the alignment of the tooltip relative to the icon
* @type {"start" | "center" | "end"} [align="center"]
*/
export let align = "center";
/**
* Set the direction of the tooltip relative to the icon
* @type {"top" | "right" | "bottom" | "left"} [direction="bottom"]
*/
export let direction = "bottom";
/**
* Set an id for the span element
* @type {string} [id]
*/
export let id = "ccs-" + Math.random().toString(36);
/**
* Obtain a reference to the button HTML element
* @type {null | HTMLElement} [ref=null]
*/
export let ref = null;
$: hidden = false;