Files
automatisch/packages/web/src/contexts/StepExecutions.jsx
2024-07-11 08:54:32 +01:00

20 lines
519 B
JavaScript

import * as React from 'react';
import PropTypes from 'prop-types';
import { StepPropType } from 'propTypes/propTypes';
export const StepExecutionsContext = React.createContext([]);
export const StepExecutionsProvider = (props) => {
const { children, value } = props;
return (
<StepExecutionsContext.Provider value={value}>
{children}
</StepExecutionsContext.Provider>
);
};
StepExecutionsProvider.propTypes = {
children: PropTypes.node.isRequired,
value: PropTypes.arrayOf(StepPropType),
};