mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +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;
|