dcp-design-react 1.12.9 → 1.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ export declare enum SizeHeight {
25
25
  small = 24
26
26
  }
27
27
  export type ComponentSize = 'small' | 'middle' | 'large';
28
- export type Locale = 'zh-cn' | 'en';
28
+ export type Locale = string;
29
29
  export type IDict = {
30
30
  text: string;
31
31
  value: string | number;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { Locale, ComponentSize } from '../_utils/types';
2
+ import type { AnyObject, ComponentSize, Locale } from '../_utils/types';
3
3
  export type IConfig = {
4
4
  locale: Locale;
5
5
  size: ComponentSize;
6
6
  theme?: string;
7
- global?: Record<string, any>;
7
+ global?: AnyObject<any>;
8
8
  };
9
9
  declare const ConfigContext: import("react").Context<IConfig>;
10
10
  export default ConfigContext;
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- import type { IConfig } from '../context';
3
- type IProps = {
4
- locale: IConfig['locale'];
5
- size: IConfig['size'];
6
- theme?: string;
7
- global?: IConfig['global'];
2
+ import { type IConfig } from '../context';
3
+ type IProps = IConfig & {
8
4
  children?: React.ReactNode;
9
5
  };
10
6
  export type ConfigProviderProps = IProps;
@@ -1,4 +1,4 @@
1
1
  export default function useLocale(): {
2
2
  t: (...args: any[]) => string;
3
- $locale: import("../_utils/types").Locale;
3
+ $locale: string;
4
4
  };