Files
automatisch/packages/web/src/contexts/StepExecutions.tsx
2022-11-05 23:57:33 +01:00

21 lines
508 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>
);
};