UNPKG

mithril-materialized

Version:
38 lines (37 loc) 1.41 kB
import { FactoryComponent } from 'mithril'; export interface FloatingActionButtonAttrs { /** 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; }>; /** Direction to open the buttons */ direction?: 'top' | 'bottom' | 'left' | 'right'; /** Whether to show the toolbar */ toolbarEnabled?: boolean; /** Hover behavior */ hoverEnabled?: boolean; } /** * Floating Action Button */ export declare const FloatingActionButton: FactoryComponent<FloatingActionButtonAttrs>;