mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(tag): define JSDoc restProps type
This commit is contained in:
parent
1e80e42573
commit
26ce330e1d
4 changed files with 16 additions and 22 deletions
|
@ -38,7 +38,7 @@
|
||||||
"rollup": "^2.33.3",
|
"rollup": "^2.33.3",
|
||||||
"rollup-plugin-svelte": "^6.1.1",
|
"rollup-plugin-svelte": "^6.1.1",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"sveld": "^0.1.0-rc.5",
|
"sveld": "^0.1.0",
|
||||||
"svelte": "^3.29.7",
|
"svelte": "^3.29.7",
|
||||||
"svelte-check": "^1.1.14",
|
"svelte-check": "^1.1.14",
|
||||||
"svelte-loader": "^2.13.6",
|
"svelte-loader": "^2.13.6",
|
||||||
|
|
|
@ -1,32 +1,24 @@
|
||||||
<script>
|
<script>
|
||||||
|
/**
|
||||||
|
* @restProps {div | span}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the type of tag
|
* Specify the type of tag
|
||||||
* @type {"red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast"} [type]
|
* @type {"red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast"} [type]
|
||||||
*/
|
*/
|
||||||
export let type = undefined;
|
export let type = undefined;
|
||||||
|
|
||||||
/**
|
/** Set to `true` to use filterable variant */
|
||||||
* Set to `true` to use filterable variant
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
export let filter = false;
|
export let filter = false;
|
||||||
|
|
||||||
/**
|
/** Set to `true` to disable a filterable tag */
|
||||||
* Set to `true` to disable a filterable tag
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
export let disabled = false;
|
export let disabled = false;
|
||||||
|
|
||||||
/**
|
/** Set to `true` to display the skeleton state */
|
||||||
* Set to `true` to display the skeleton state
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
export let skeleton = false;
|
export let skeleton = false;
|
||||||
|
|
||||||
/**
|
/** Set the title for the close button in a filterable tag */
|
||||||
* Set the title for the close button in a filterable tag
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
export let title = "Clear filter";
|
export let title = "Clear filter";
|
||||||
|
|
||||||
/** Set an id for the filterable tag */
|
/** Set an id for the filterable tag */
|
||||||
|
|
4
types/Tag/Tag.d.ts
vendored
4
types/Tag/Tag.d.ts
vendored
|
@ -1,6 +1,8 @@
|
||||||
/// <reference types="svelte" />
|
/// <reference types="svelte" />
|
||||||
|
|
||||||
export interface TagProps {
|
export interface TagProps
|
||||||
|
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]>,
|
||||||
|
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["span"]> {
|
||||||
/**
|
/**
|
||||||
* Specify the type of tag
|
* Specify the type of tag
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2728,10 +2728,10 @@ supports-color@^7.0.0, supports-color@^7.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^4.0.0"
|
has-flag "^4.0.0"
|
||||||
|
|
||||||
sveld@^0.1.0-rc.5:
|
sveld@^0.1.0:
|
||||||
version "0.1.0-rc.5"
|
version "0.1.0"
|
||||||
resolved "https://registry.npmjs.org/sveld/-/sveld-0.1.0-rc.5.tgz#32d35b3d2b9f2aaed28202da0e5f5adf69b6f181"
|
resolved "https://registry.npmjs.org/sveld/-/sveld-0.1.0.tgz#8cf208f21ba4f6af24462fcb48f279778bac7a67"
|
||||||
integrity sha512-TJY0mYN8vUPiPL8GGNn//IS6WicUF+MEbKCNzM6oXojIp6RSyBnJyJQsjIGFmfs6x5GIac+Sz8CjIFgQ40BfJQ==
|
integrity sha512-JGUVJ6/GTmOeAnh3F+A+l0utszL8qDKQJ7wsTMupqA+vzqF4y+Bq8Khlt3MVBdgYmEClXIlzSLiMQ8g232h6Wg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@rollup/plugin-node-resolve" "^10.0.0"
|
"@rollup/plugin-node-resolve" "^10.0.0"
|
||||||
comment-parser "^0.7.6"
|
comment-parser "^0.7.6"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue