UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

61 lines (60 loc) 1.31 kB
import { CSSProperties } from 'glamor'; import React from 'react'; import { BoxSizeStyles } from '../styles/defaults/themes.interface'; /** * Interface for the Toolbar action items */ export interface ToolbarActionItem { /** * Unique id for the action item */ id: string; /** * The tooltip label */ ariaLabel: string; /** * Callback for when the action is clicked */ onClick?: (e?: any) => void; /** * Icon to display */ icon: React.ReactNode; /** * Identifies if the item is selected */ selected?: boolean; /** * Style overwrites for the button * @optional */ style?: CSSProperties; /** * The size of the toolbar button * @optional * @default "m" */ size?: keyof BoxSizeStyles; /** * Render as * @default "button" * @optional */ as?: string; /** * if true, it will hide the hint tooltip * @default false * @optional */ hideHint?: boolean; /** * If provided the item will be rendered as this component */ component?: React.ReactNode; } export interface ToolbarActionsProps { actions: ToolbarActionItem[]; selectedId?: string; } export declare const Toolbar: React.FC<ToolbarActionsProps>;