Files
automatisch/packages/web/src/contexts/StepExecutions.tsx
2022-03-03 13:33:33 +03:00

20 lines
513 B
TypeScript

import * as React from 'react';
import type { IStep } from '@automatisch/types';
export const StepExecutionsContext = React.createContext<IStep[]>([]);
type StepExecutionsProviderProps = {
children: React.ReactNode;
value: IStep[];
}
export const StepExecutionsProvider = (props: StepExecutionsProviderProps): React.ReactElement => {
const { children, value } = props;
return (
<StepExecutionsContext.Provider
value={value}
>
{children}
</StepExecutionsContext.Provider>
);
};