import * as _ from "lodash"; import * as classNames from "classnames"; import * as React from "react"; import { Loading, LoadingType, ILoadingProps } from "../Loading"; import { Button, ButtonSize, IButtonProps } from "../Button"; export enum CalloutType { Boxed = "boxed", Faded = "faded", } export interface ICalloutProps { type: CalloutType; text: string; subtext?: string; button?: IButtonProps; // TODO: This is a component icon?: any; iconRight?: boolean; innerRef?: React.RefObject; className?: string; loading?: Partial | boolean; onClick?: () => void; style?: any; } export const Callout = ({ text, subtext, button, icon, iconRight, type, innerRef, className, loading, onClick, style, }: ICalloutProps) => (
{(icon && !iconRight) && (
{icon}
)} {(text || subtext) && ( {text} {subtext} )} {button && (
)} {loading && (
)} {(icon && iconRight) && (
{icon}
)}
);