mithril-materialized
Version:
A materialize library for mithril.
34 lines (33 loc) • 1.31 kB
TypeScript
import { FactoryComponent } from 'mithril';
export interface IFloatingActionButton extends Partial<M.FloatingActionButtonOptions> {
/** Optional classes to add to the top element */
className?: string;
/** Optional style to add to the top element, e.g. for positioning it inline */
style?: string;
/** Material-icons name for the main FAB, @see https://materializecss.com/icons.html */
iconName: string;
/** Helper option to place the FAB inline instead of the bottom right of the display */
position?: 'left' | 'right' | 'inline-left' | 'inline-right';
/**
* Optional icon class, e.g. tiny (1em), small (2em), medium (4em), large (6em), or 'tiny right'.
* @default large
*/
iconClass?: string;
/** The buttons you want to show */
buttons?: Array<{
/** Optional classes you want to add to the main element */
className?: string;
/** Name of the icon */
iconName: string;
/** Classes of the icon */
iconClass?: string;
/** On click function */
onClick?: (e: UIEvent) => void;
}>;
}
/**
* A Floating Action Button.
*
* @example FlatButton = ButtonFactory('a.waves-effect.waves-teal.btn-flat');
*/
export declare const FloatingActionButton: FactoryComponent<IFloatingActionButton>;