UNPKG

@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.

26 lines (21 loc) 696 B
// @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 }, isColumnOnDesktop: boolean, setTypes: Dispatch<SetStateAction<{ [key: number]: Type }>>, |}; export type StepContext = {| +index: number, +last: boolean, |}; declare export var TimelineStatusProvider: React.ComponentType<{| children: React.Node, direction?: "row" | "column", |}>; declare export var TimelineStepContext: React.Context<StepContext>; declare export function useStatuses(): Context; declare export function useStep(): StepContext;