@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
22 lines (17 loc) • 631 B
Flow
// @flow
import * as React from "react";
import type { Type } from "./TimelineStep";
type SetStateAction<S> = S | ((prevState: S) => S);
type Dispatch<A> = (value: A) => void;
export type Context = {|
types: { [key: number]: Type },
setTypes: Dispatch<SetStateAction<{ [key: number]: Type }>>,
|};
export type StepContext = {|
+index: number,
+last: boolean,
|};
declare export var TimelineStatusProvider: React.ComponentType<{| children: React.Node |}>;
declare export var TimelineStepContext: React.Context<StepContext>;
declare export function useStatuses(): Context;
declare export function useStep(): StepContext;