mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
feat: feat: expose ConfigContext (#26705)
This commit is contained in:
parent
5507641331
commit
ea19589619
@ -53,7 +53,9 @@ export interface ConfigProviderProps {
|
||||
dropdownMatchSelectWidth?: boolean;
|
||||
}
|
||||
|
||||
const ConfigProvider: React.FC<ConfigProviderProps> = props => {
|
||||
const ConfigProvider: React.FC<ConfigProviderProps> & {
|
||||
ConfigContext: typeof ConfigContext;
|
||||
} = props => {
|
||||
React.useEffect(() => {
|
||||
if (props.direction) {
|
||||
message.config({
|
||||
@ -166,4 +168,6 @@ const ConfigProvider: React.FC<ConfigProviderProps> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
/** @private internal usage. do not use in your production */
|
||||
ConfigProvider.ConfigContext = ConfigContext;
|
||||
export default ConfigProvider;
|
||||
|
Loading…
Reference in New Issue
Block a user