mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 19:01:05 +00:00
chore: v11 Tabs
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.
This commit is contained in:
parent
7f84c57cb9
commit
1628f56184
8 changed files with 47 additions and 146 deletions
2
types/Tabs/Tab.svelte.d.ts
vendored
2
types/Tabs/Tab.svelte.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["li"];
|
||||
type RestProps = SvelteHTMLElements["a"];
|
||||
|
||||
export interface TabProps extends RestProps {
|
||||
/**
|
||||
|
|
24
types/Tabs/Tabs.svelte.d.ts
vendored
24
types/Tabs/Tabs.svelte.d.ts
vendored
|
@ -11,10 +11,10 @@ export interface TabsProps extends RestProps {
|
|||
selected?: number;
|
||||
|
||||
/**
|
||||
* Specify the type of tabs
|
||||
* @default "default"
|
||||
* Set to `true` for tabs to be contained
|
||||
* @default false
|
||||
*/
|
||||
type?: "default" | "container";
|
||||
contained?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` for tabs to have an auto-width
|
||||
|
@ -22,27 +22,11 @@ export interface TabsProps extends RestProps {
|
|||
*/
|
||||
autoWidth?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the chevron icon
|
||||
* @default "Show menu options"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
|
||||
/**
|
||||
* Specify the tab trigger href attribute
|
||||
* @default "#"
|
||||
*/
|
||||
triggerHref?: string;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
|
||||
export default class Tabs extends SvelteComponentTyped<
|
||||
TabsProps,
|
||||
{
|
||||
keypress: WindowEventMap["keypress"];
|
||||
click: WindowEventMap["click"];
|
||||
change: CustomEvent<any>;
|
||||
},
|
||||
{ change: CustomEvent<any> },
|
||||
{ default: {}; content: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue