UNPKG

@combine-labs/combine-polaris

Version:

Combine Lab's product component library. Forked from Shopify's Polaris.

28 lines (27 loc) 1.13 kB
import * as React from 'react'; import { WithAppProviderProps } from '../AppProvider'; import { IconSource } from '../Icon'; export declare type Status = 'success' | 'info' | 'attention' | 'warning' | 'new' | 'danger'; export declare type Progress = 'incomplete' | 'partiallyComplete' | 'complete'; export interface Props { /** The content to display inside the badge. */ children?: string; /** Set the color of the badge for the given status. */ status?: Status; /** Render a pip showing the progress of a given task. */ progress?: Progress; /** Show an icon */ icon?: IconSource; /** Allows the badge to grow to the width of its container */ fullWidth?: boolean; } export declare type CombinedProps = Props & WithAppProviderProps; export declare const PROGRESS_LABELS: { [key in Progress]: Progress; }; export declare const STATUS_LABELS: { [key in Status]: Status; }; declare function Badge({ children, status, progress, icon, fullWidth, polaris: { intl } }: CombinedProps): JSX.Element; declare const _default: React.ComponentClass<Props> & typeof Badge; export default _default;