UNPKG

@jirkasa/code-box

Version:

Showcase code samples on the web with a container that lets users select and display different samples.

20 lines (19 loc) 902 B
import CodeView from "../code-view/CodeView"; import EventSourcePoint from "../utils/EventSourcePoint"; import CodeViewButton from "./CodeViewButton"; /** Represents code view button as button element. */ declare abstract class ElementCodeViewButton extends CodeViewButton { /** HTML Button element. */ protected buttonElement: HTMLButtonElement; /** * Creates new code view button. * @param showCodeViewEventSource Event source for which will be fired event when code view to which the button belongs to should be set as active. * @param codeView Code view to which the button belongs to. */ constructor(showCodeViewEventSource: EventSourcePoint<CodeViewButton, CodeView>, codeView: CodeView); appendTo(container: HTMLElement): void; detach(): void; enableTabNavigation(): void; disableTabNavigation(): void; } export default ElementCodeViewButton;