amis-rpc-design/node_modules/antd/es/config-provider/SizeContext.js

15 lines
394 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use client";
import * as React from 'react';
const SizeContext = /*#__PURE__*/React.createContext(undefined);
export const SizeContextProvider = _ref => {
let {
children,
size
} = _ref;
const originSize = React.useContext(SizeContext);
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
value: size || originSize
}, children);
};
export default SizeContext;