@jirkasa/code-box
Version:
Showcase code samples on the web with a container that lets users select and display different samples.
36 lines (35 loc) • 919 B
TypeScript
/** Represents file button. */
declare abstract class FileButton {
/**
* Appends button to element.
* @param container Element to append button to.
*/
abstract appendTo(container: HTMLElement): void;
/**
* Detaches button from its parent element.
*/
abstract detach(): void;
/**
* Sets text of button.
* @param text Text.
*/
abstract setText(text: string): void;
/**
* Sets download link.
* @param downloadLink Download link (or null to disable download).
*/
abstract setDownloadLink(downloadLink: string | null): void;
/**
* Returns download link of button.
*/
abstract getDownloadLink(): string | null;
/**
* Enables tab navigation.
*/
abstract enableTabNavigation(): void;
/**
* Disables tab navigation.
*/
abstract disableTabNavigation(): void;
}
export default FileButton;