@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
23 lines • 769 B
JavaScript
import React, { useMemo } from 'react';
export const AreaContext = /*#__PURE__*/React.createContext({
shouldChangeColor: undefined,
shouldDisableListItemPadding: undefined
});
AreaContext.displayName = 'AreaContext';
const AreaContextProvider = _ref => {
let {
children,
shouldChangeColor = true,
shouldDisableListItemPadding = false
} = _ref;
const providerValue = useMemo(() => ({
shouldChangeColor,
shouldDisableListItemPadding
}), [shouldChangeColor, shouldDisableListItemPadding]);
return /*#__PURE__*/React.createElement(AreaContext.Provider, {
value: providerValue
}, children);
};
AreaContextProvider.displayName = 'AreaContextProvider';
export default AreaContextProvider;
//# sourceMappingURL=AreaContextProvider.js.map