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/Tabs/Tab.svelte.d.ts
vendored
8
types/Tabs/Tab.svelte.d.ts
vendored
|
@ -1,9 +1,9 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["li"];
|
||||
type $RestProps = SvelteHTMLElements["li"];
|
||||
|
||||
export interface TabProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the tab label.
|
||||
* Alternatively, use the default slot (e.g., `<Tab><span>Label</span></Tab>`)
|
||||
|
@ -42,7 +42,9 @@ export interface TabProps extends RestProps {
|
|||
ref?: null | HTMLAnchorElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TabProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class Tab extends SvelteComponentTyped<
|
||||
TabProps,
|
||||
|
|
8
types/Tabs/TabContent.svelte.d.ts
vendored
8
types/Tabs/TabContent.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 TabContentProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Set an id for the top-level element
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
|
@ -11,7 +11,9 @@ export interface TabContentProps extends RestProps {
|
|||
id?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TabContentProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class TabContent extends SvelteComponentTyped<
|
||||
TabContentProps,
|
||||
|
|
8
types/Tabs/Tabs.svelte.d.ts
vendored
8
types/Tabs/Tabs.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 TabsProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the selected tab index
|
||||
* @default 0
|
||||
|
@ -35,7 +35,9 @@ export interface TabsProps extends RestProps {
|
|||
triggerHref?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TabsProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class Tabs extends SvelteComponentTyped<
|
||||
TabsProps,
|
||||
|
|
8
types/Tabs/TabsSkeleton.svelte.d.ts
vendored
8
types/Tabs/TabsSkeleton.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 TabsSkeletonProps extends RestProps {
|
||||
type $Props = {
|
||||
/**
|
||||
* Specify the number of tabs to render
|
||||
* @default 4
|
||||
|
@ -17,7 +17,9 @@ export interface TabsSkeletonProps extends RestProps {
|
|||
type?: "default" | "container";
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
};
|
||||
|
||||
export type TabsSkeletonProps = Omit<$RestProps, keyof $Props> & $Props;
|
||||
|
||||
export default class TabsSkeleton extends SvelteComponentTyped<
|
||||
TabsSkeletonProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue