Skip to content

Commit

Permalink
docs: Improve document syntax (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 authored Dec 9, 2024
1 parent 32ddbe7 commit 4dfe300
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions components/x-provider/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ The `XProvider` extends the `ConfigProvider` from `antd` and provides global con

If you are already using `ConfigProvider` from `antd`, please make the following changes to your code:

```tsx
```diff
- import { ConfigProvider } from 'antd';
+ import { XProvider } from '@ant-design/x';

- <ConfigProvider>
- // ...
- </ConfigProvider>

+ <XProvider>
+ // ...
+ </XProvider>
const App = () => (
- <ConfigProvider>
+ <XProvider>
<YourApp />
- </ConfigProvider>
+ </XProvider>
);
```

## Examples
Expand Down
16 changes: 8 additions & 8 deletions components/x-provider/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ demo:

如果您已经使用 `antd``ConfigProvider`,请对您的代码做如下变更:

```tsx
```diff
- import { ConfigProvider } from 'antd';
+ import { XProvider } from '@ant-design/x';

- <ConfigProvider {...configProps}>
- // ...
- </ConfigProvider>

+ <XProvider {...configProps}>
+ // ...
+ </XProvider>
const App = () => (
- <ConfigProvider>
+ <XProvider>
<YourApp />
- </ConfigProvider>
+ </XProvider>
);
```

## 代码演示
Expand Down

0 comments on commit 4dfe300

Please sign in to comment.