simpa
Version:
Lightweight library for prototyping Single Page Applications.
27 lines (26 loc) • 630 B
TypeScript
import { Component } from "./component";
/**
* Base class for all views.
*/
export declare class View extends Component {
/**
* Creates a new view component.
*
* @param className Name of the style of the view's root container.
*/
constructor(className: string);
/**
* Makes the view visible and scrolls to the top of the view
*/
show(): void;
/**
* Makes the view invisible.
*/
hide(): void;
/**
* Replaces the body of the view with new content.
*
* @param content New content of the view.
*/
replaceBody(content: HTMLElement): void;
}