feat(tile): add optional expand/collapse icon labels to ExpandableTile

This commit is contained in:
Eric Liu 2021-01-22 13:39:44 -08:00
commit 524b5080a6
6 changed files with 83 additions and 50 deletions

View file

@ -1,6 +1,6 @@
/// <reference types="svelte" />
export interface ExpandableTileProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
export interface ExpandableTileProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
/**
* Set to `true` to expand the tile
* @default false
@ -37,6 +37,18 @@ export interface ExpandableTileProps extends svelte.JSX.HTMLAttributes<HTMLEleme
*/
tileExpandedIconText?: string;
/**
* Specify the icon label of the expanded tile
* @default ""
*/
tileExpandedLabel?: string;
/**
* Specify the icon label of the collapsed tile
* @default ""
*/
tileCollapsedLabel?: string;
/**
* Specify the tabindex
* @default "0"
@ -53,7 +65,7 @@ export interface ExpandableTileProps extends svelte.JSX.HTMLAttributes<HTMLEleme
* Obtain a reference to the top-level element
* @default null
*/
ref?: null | HTMLDivElement;
ref?: null | HTMLButtonElement;
}
export default class ExpandableTile {