mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
16 lines
346 B
TypeScript
16 lines
346 B
TypeScript
|
import { useContext } from 'react';
|
||
|
import DisabledContext from '../DisabledContext';
|
||
|
import SizeContext from '../SizeContext';
|
||
|
|
||
|
function useConfig() {
|
||
|
const componentDisabled = useContext(DisabledContext);
|
||
|
const componentSize = useContext(SizeContext);
|
||
|
|
||
|
return {
|
||
|
componentDisabled,
|
||
|
componentSize,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export default useConfig;
|