mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(types): use type alias instead of interface for $$restProps
This commit is contained in:
parent
57e99f3a4c
commit
6fbd8ae6a9
165 changed files with 752 additions and 463 deletions
8
types/Tile/ClickableTile.svelte.d.ts
vendored
8
types/Tile/ClickableTile.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["a"] & SvelteHTMLElements["p"];
|
||||
type $RestProps = SvelteHTMLElements["a"] & SvelteHTMLElements["p"];
|
||||
|
||||
export interface ClickableTileProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to click the tile
|
||||
* @default false
|
||||
|
@ -29,7 +29,9 @@ export interface ClickableTileProps extends RestProps {
|
|||
href?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type ClickableTileProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class ClickableTile extends SvelteComponentTyped<
|
||||
ClickableTileProps,
|
||||
|
|
8
types/Tile/ExpandableTile.svelte.d.ts
vendored
8
types/Tile/ExpandableTile.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["button"];
|
||||
type $RestProps = SvelteHTMLElements["button"];
|
||||
|
||||
export interface ExpandableTileProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to expand the tile
|
||||
* @default false
|
||||
|
@ -71,7 +71,9 @@ export interface ExpandableTileProps extends RestProps {
|
|||
ref?: null | HTMLButtonElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type ExpandableTileProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class ExpandableTile extends SvelteComponentTyped<
|
||||
ExpandableTileProps,
|
||||
|
|
8
types/Tile/RadioTile.svelte.d.ts
vendored
8
types/Tile/RadioTile.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["label"];
|
||||
type $RestProps = SvelteHTMLElements["label"];
|
||||
|
||||
export interface RadioTileProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to check the tile
|
||||
* @default false
|
||||
|
@ -59,7 +59,9 @@ export interface RadioTileProps extends RestProps {
|
|||
name?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type RadioTileProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class RadioTile extends SvelteComponentTyped<
|
||||
RadioTileProps,
|
||||
|
|
8
types/Tile/SelectableTile.svelte.d.ts
vendored
8
types/Tile/SelectableTile.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["label"];
|
||||
type $RestProps = SvelteHTMLElements["label"];
|
||||
|
||||
export interface SelectableTileProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to select the tile
|
||||
* @default false
|
||||
|
@ -65,7 +65,9 @@ export interface SelectableTileProps extends RestProps {
|
|||
ref?: null | HTMLInputElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type SelectableTileProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class SelectableTile extends SvelteComponentTyped<
|
||||
SelectableTileProps,
|
||||
|
|
8
types/Tile/Tile.svelte.d.ts
vendored
8
types/Tile/Tile.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
type $RestProps = SvelteHTMLElements["div"];
|
||||
|
||||
export interface TileProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @default false
|
||||
|
@ -11,7 +11,9 @@ export interface TileProps extends RestProps {
|
|||
light?: boolean;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TileProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class Tile extends SvelteComponentTyped<
|
||||
TileProps,
|
||||
|
|
8
types/Tile/TileGroup.svelte.d.ts
vendored
8
types/Tile/TileGroup.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["fieldset"];
|
||||
type $RestProps = SvelteHTMLElements["fieldset"];
|
||||
|
||||
export interface TileGroupProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the selected tile value
|
||||
* @default undefined
|
||||
|
@ -35,7 +35,9 @@ export interface TileGroupProps extends RestProps {
|
|||
legend?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TileGroupProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class TileGroup extends SvelteComponentTyped<
|
||||
TileGroupProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue