mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore: add more prop annotations
This commit is contained in:
parent
8c1ffd4cb0
commit
773b18d314
75 changed files with 877 additions and 137 deletions
|
@ -10,6 +10,11 @@
|
|||
export let allowEmpty = false;
|
||||
export let disabled = false;
|
||||
export let iconDescription = "";
|
||||
|
||||
/**
|
||||
* Set an id for the input element
|
||||
* @type {string} [id]
|
||||
*/
|
||||
export let id = "ccs-" + Math.random().toString(36);
|
||||
export let name = undefined;
|
||||
export let invalid = false;
|
||||
|
@ -17,11 +22,16 @@
|
|||
export let helperText = "";
|
||||
export let label = "";
|
||||
export let hideLabel = false;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the input HTML element
|
||||
* @type {null | HTMLElement} [ref=null]
|
||||
*/
|
||||
export let ref = null;
|
||||
export let translateWithId = id => defaultTranslations[id];
|
||||
export let translateWithId = (id) => defaultTranslations[id];
|
||||
export const translationIds = {
|
||||
increment: "increment",
|
||||
decrement: "decrement"
|
||||
decrement: "decrement",
|
||||
};
|
||||
|
||||
import { createEventDispatcher, afterUpdate } from "svelte";
|
||||
|
@ -31,7 +41,7 @@
|
|||
|
||||
const defaultTranslations = {
|
||||
[translationIds.increment]: "Increment number",
|
||||
[translationIds.decrement]: "Decrement number"
|
||||
[translationIds.decrement]: "Decrement number",
|
||||
};
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue