UNPKG

@navinc/base-react-components

Version:
47 lines (44 loc) 2.04 kB
import { ReactNode } from 'react'; import { IconName } from './icons/index.js'; declare const variations: { readonly positive: { readonly bgColor: "navStatusPositive200"; readonly icon: "navStatusPositive"; }; readonly negative: { readonly bgColor: "navStatusNegative200"; readonly icon: "navStatusNegative"; }; readonly improve: { readonly bgColor: "navSecondary"; readonly icon: "navSecondary600"; }; readonly neutral: { readonly bgColor: "navNeutral100"; readonly icon: "navNeutral400"; }; }; type InsightType = keyof typeof variations; export declare const StyledInsight: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, { type?: InsightType; }>> & string; type CardInsightProps = { action?: () => void; actionHref?: string; actionLabel?: string; isActionLoading?: boolean; type?: InsightType; title?: ReactNode; copy?: ReactNode; shouldOpenNewTab?: boolean; className?: string; icon?: IconName; 'data-testid'?: string; }; /** This component should always be used within a StandardCard Providing an actionHref will change the action element to an `<a>`. By providing an action instead, a `<button>` will be rendered and loading dots can be displayed through `isActionLoading` For more details see: https://navinc.invisionapp.com/d/main/#/console/15452082/335365553/preview */ export declare const CardInsight: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<CardInsightProps, never>> & string & Omit<({ action, actionHref, actionLabel, isActionLoading, className, copy, icon, shouldOpenNewTab, type, title, "data-testid": dataTestId, }: CardInsightProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>; export {};