carbon-components-svelte/types/Tile/ExpandableTile.svelte.d.ts
Gregor Wassmann ee55f2ba36
chore: v11 ExpandableTile
Note that state labels `tileCollapsedLabel` and `tileExpandedLabel` are no longer supported.
2024-01-02 16:45:37 -05:00

74 lines
1.6 KiB
TypeScript

import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["button"];
export interface ExpandableTileProps extends RestProps {
/**
* Set to `true` to expand the tile
* @default false
*/
expanded?: boolean;
/**
* Set to `true` to enable the light variant
* @default false
*/
light?: boolean;
/**
* Specify the max height of the tile (number of pixels)
* @default 0
*/
tileMaxHeight?: number;
/**
* Specify the padding of the tile (number of pixels)
* @default 0
*/
tilePadding?: number;
/**
* Specify the icon text of the collapsed tile
* @default "Interact to expand Tile"
*/
tileCollapsedIconText?: string;
/**
* Specify the icon text of the expanded tile
* @default "Interact to collapse Tile"
*/
tileExpandedIconText?: string;
/**
* Specify the tabindex
* @default "0"
*/
tabindex?: string;
/**
* Set an id for the top-level div element
* @default "ccs-" + Math.random().toString(36)
*/
id?: string;
/**
* Obtain a reference to the top-level element
* @default null
*/
ref?: null | HTMLButtonElement;
[key: `data-${string}`]: any;
}
export default class ExpandableTile extends SvelteComponentTyped<
ExpandableTileProps,
{
click: WindowEventMap["click"];
keypress: WindowEventMap["keypress"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
{ above: {}; below: {} }
> {}