mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
34 lines
1,011 B
TypeScript
34 lines
1,011 B
TypeScript
/// <reference types="svelte" />
|
|
|
|
export interface ClickableTileProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
|
|
/**
|
|
* Set to `true` to click the tile
|
|
* @default false
|
|
*/
|
|
clicked?: boolean;
|
|
|
|
/**
|
|
* Set to `true` to enable the light variant
|
|
* @default false
|
|
*/
|
|
light?: boolean;
|
|
|
|
/**
|
|
* Set the `href`
|
|
*/
|
|
href?: string;
|
|
}
|
|
|
|
export default class ClickableTile {
|
|
$$prop_def: ClickableTileProps;
|
|
$$slot_def: {
|
|
default: {};
|
|
};
|
|
|
|
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
|
$on(eventname: "keydown", cb: (event: WindowEventMap["keydown"]) => void): () => void;
|
|
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
|
|
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
|
|
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
|
|
$on(eventname: string, cb: (event: Event) => void): () => void;
|
|
}
|