department-of-veterans-affairs/vets-website

View on GitHub
src/applications/_mock-form-ae-design-patterns/vadx/context/plugin.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import PropTypes from 'prop-types';

export const PluginContext = React.createContext();

export const PluginProvider = ({ children, plugin = {} }) => {
  return (
    <PluginContext.Provider value={{ plugin }}>
      {children}
    </PluginContext.Provider>
  );
};

PluginProvider.propTypes = {
  children: PropTypes.node.isRequired,
  plugin: PropTypes.object,
};