30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import * as React from 'react';
|
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
|
|
type Scope<C = any> = {
|
|
[scopeName: string]: React.Context<C>[];
|
|
} | undefined;
|
|
type ScopeHook = (scope: Scope) => {
|
|
[__scopeProp: string]: Scope;
|
|
};
|
|
interface CreateScope {
|
|
scopeName: string;
|
|
(): ScopeHook;
|
|
}
|
|
|
|
declare const createProgressScope: CreateScope;
|
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
interface ProgressProps extends PrimitiveDivProps {
|
|
value?: number | null | undefined;
|
|
max?: number;
|
|
getValueLabel?(value: number, max: number): string;
|
|
}
|
|
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
interface ProgressIndicatorProps extends PrimitiveDivProps {
|
|
}
|
|
declare const ProgressIndicator: React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
declare const Root: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
declare const Indicator: React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
|
|
export { Indicator, Progress, ProgressIndicator, type ProgressIndicatorProps, type ProgressProps, Root, createProgressScope };
|