mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
In v11 [Tabs](https://carbondesignsystem.com/migrating/guide/design/#tabs-breaking) received some additional modifiers. In this commit we only want to make sure that the Svelte v10 tabs still work using v11 styles. This probably needs additional testing.
32 lines
668 B
TypeScript
32 lines
668 B
TypeScript
import type { SvelteComponentTyped } from "svelte";
|
|
import type { SvelteHTMLElements } from "svelte/elements";
|
|
|
|
type RestProps = SvelteHTMLElements["div"];
|
|
|
|
export interface TabsProps extends RestProps {
|
|
/**
|
|
* Specify the selected tab index
|
|
* @default 0
|
|
*/
|
|
selected?: number;
|
|
|
|
/**
|
|
* Set to `true` for tabs to be contained
|
|
* @default false
|
|
*/
|
|
contained?: boolean;
|
|
|
|
/**
|
|
* Set to `true` for tabs to have an auto-width
|
|
* @default false
|
|
*/
|
|
autoWidth?: boolean;
|
|
|
|
[key: `data-${string}`]: any;
|
|
}
|
|
|
|
export default class Tabs extends SvelteComponentTyped<
|
|
TabsProps,
|
|
{ change: CustomEvent<any> },
|
|
{ default: {}; content: {} }
|
|
> {}
|