amis-rpc-design/node_modules/antd/es/typography/hooks/useMergedConfig.js
2023-10-07 19:42:30 +08:00

7 lines
323 B
JavaScript

import * as React from 'react';
export default function useMergedConfig(propConfig, templateConfig) {
return React.useMemo(() => {
const support = !!propConfig;
return [support, Object.assign(Object.assign({}, templateConfig), support && typeof propConfig === 'object' ? propConfig : null)];
}, [propConfig]);
}