UNPKG

@enact/sandstone

Version:

Large-screen/TV support library for Enact, containing a variety of UI components.

58 lines (50 loc) 1.66 kB
// Type definitions for sandstone/ProgressButton import * as React from "react"; import { ButtonBaseProps as sandstone_Button_ButtonBaseProps } from "@enact/sandstone/Button"; import { ProgressBarProps as sandstone_ProgressBar_ProgressBarProps } from "@enact/sandstone/ProgressBar"; type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N; export interface ProgressButtonBaseProps extends Merge< sandstone_Button_ButtonBaseProps, sandstone_ProgressBar_ProgressBarProps > { /** * Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component. * * The following classes are supported: * * `progressButton` - The root component class */ css?: object; /** * The icon content displayed with progress. */ icon?: string | object; /** * A number between `0` and `1` indicating the proportion of the filled portion of the bar. */ progress?: number; /** * Shows progress instead of text. */ showProgress?: boolean; /** * The size of the progress button. */ size?: "large" | "small"; } /** * Renders a sandstone-styled progress button. */ export class ProgressButtonBase extends React.Component< Merge<React.HTMLProps<HTMLElement>, ProgressButtonBaseProps> > {} export interface ProgressButtonProps extends ProgressButtonBaseProps {} /** * The ready-to-use Sandstone-styled ProgressButton. */ export class ProgressButton extends React.Component< Merge<React.HTMLProps<HTMLElement>, ProgressButtonProps> > {} export default ProgressButton;