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,43 +1,28 @@
<script>
/**
* Set the size of the composed modal
* @type {"xs" | "sm" | "lg"} [size]
* @type {"xs" | "sm" | "lg"}
*/
export let size = undefined;
/**
* Set to `true` to open the modal
* @type {boolean} [open=false]
*/
/** Set to `true` to open the modal */
export let open = false;
/**
* Set to `true` to use the danger variant
* @type {boolean} [danger=false]
*/
/** Set to `true` to use the danger variant */
export let danger = false;
/**
* Set to `true` to prevent the modal from closing when clicking outside
* @type {boolean} [preventCloseOnClickOutside=false]
*/
/** Set to `true` to prevent the modal from closing when clicking outside */
export let preventCloseOnClickOutside = false;
/**
* Specify a class for the inner modal
* @type {string} [containerClass=""]
*/
/** Specify a class for the inner modal */
export let containerClass = "";
/**
* Specify a selector to be focused when opening the modal
* @type {string} [selectorPrimaryFocus="[data-modal-primary-focus]"]
*/
/** Specify a selector to be focused when opening the modal */
export let selectorPrimaryFocus = "[data-modal-primary-focus]";
/**
* Obtain a reference to the top-level HTML element
* @type {null | HTMLElement} [ref=null]
* @type {null | HTMLDivElement}
*/
export let ref = null;

View file

@ -1,14 +1,8 @@
<script>
/**
* Set to `true` if the modal contains form elements
* @type {boolean} [hasForm=false]
*/
/** Set to `true` if the modal contains form elements */
export let hasForm = false;
/**
* Set to `true` if the modal contains scrolling content
* @type {boolean} [hasScrollingContent=false]
*/
/** Set to `true` if the modal contains scrolling content */
export let hasScrollingContent = false;
</script>

View file

@ -1,38 +1,26 @@
<script>
/**
* Specify the primary button text
* @type {string} [primaryButtonText=""]
*/
/** Specify the primary button text */
export let primaryButtonText = "";
/**
* Set to `true` to disable the primary button
* @type {boolean} [primaryButtonDisabled=false]
*/
/** Set to `true` to disable the primary button */
export let primaryButtonDisabled = false;
/**
* Specify a class for the primary button
* @type {string} [primaryClass]
* @type {string}
*/
export let primaryClass = undefined;
/**
* Specify the secondary button text
* @type {string} [secondaryButtonText=""]
*/
/** Specify the secondary button text */
export let secondaryButtonText = "";
/**
* Specify a class for the secondary button
* @type {string} [secondaryClass]
* @type {string}
*/
export let secondaryClass = undefined;
/**
* Set to `true` to use the danger variant
* @type {boolean} [danger=false]
*/
/** Set to `true` to use the danger variant */
export let danger = false;
import { getContext } from "svelte";

View file

@ -1,44 +1,23 @@
<script>
/**
* Specify the modal title
* @type {string} [title=""]
*/
/** Specify the modal title */
export let title = "";
/**
* Specify the modal label
* @type {string} [label=""]
*/
/** Specify the modal label */
export let label = "";
/**
* Specify the label class
* @type {string} [labelClass=""]
*/
/** Specify the label class */
export let labelClass = "";
/**
* Specify the title class
* @type {string} [titleClass=""]
*/
/** Specify the title class */
export let titleClass = "";
/**
* Specify the close class
* @type {string} [closeClass=""]
*/
/** Specify the close class */
export let closeClass = "";
/**
* Specify the close icon class
* @type {string} [closeIconClass=""]
*/
/** Specify the close icon class */
export let closeIconClass = "";
/**
* Specify the ARIA label for the close icon
* @type {string} [iconDescription="Close"]
*/
/** Specify the ARIA label for the close icon */
export let iconDescription = "Close";
import { getContext } from "svelte";