@jirkasa/code-box
Version:
Showcase code samples on the web with a container that lets users select and display different samples.
23 lines (22 loc) • 1.1 kB
TypeScript
import CodeView from "../../code-view/CodeView";
import EventSourcePoint from "../../utils/EventSourcePoint";
import CodeViewButton from "../CodeViewButton";
import ElementCodeViewButton from "../ElementCodeViewButton";
/** Represents code view button for tab code box. */
declare class TabCodeViewButton extends ElementCodeViewButton {
/** Text element of button. */
private textElement;
/**
* Creates new code view button.
* @param text Text of 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.
* @param svgSpritePath Path to SVG sprite.
* @param iconName Name of icon for button.
*/
constructor(text: string, showCodeViewEventSource: EventSourcePoint<CodeViewButton, CodeView>, codeView: CodeView, svgSpritePath?: string | null, iconName?: string | null);
setText(text: string): void;
setAsActive(): void;
setAsInactive(): void;
}
export default TabCodeViewButton;