-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #606 from oceanbase/dengfuping-dev
fix(design): ConfigProvider static function should work for latest antd
- Loading branch information
Showing
6 changed files
with
115 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React, { useState } from 'react'; | ||
import { Button, Card, Modal, Spin } from '@oceanbase/design'; | ||
|
||
const App: React.FC = () => { | ||
const [loading, setLoading] = useState(false); | ||
return ( | ||
<> | ||
<Button | ||
type="primary" | ||
onClick={() => { | ||
Modal.confirm({ | ||
title: 'This is first Modal.confirm', | ||
onOk: () => { | ||
setLoading(true); | ||
setTimeout(() => { | ||
setLoading(false); | ||
Modal.confirm({ | ||
title: 'This is second Modal.confirm', | ||
}); | ||
}, 2000); | ||
}, | ||
}); | ||
}} | ||
> | ||
Click | ||
</Button> | ||
<div style={{ marginTop: 16 }}> | ||
{loading ? ( | ||
<Spin /> | ||
) : ( | ||
<Card title="Card title" style={{ width: 300 }}> | ||
<div>Card content</div> | ||
<div>Card content</div> | ||
<div>Card content</div> | ||
</Card> | ||
)} | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
packages/design/src/config-provider/__tests__/injectStaticFunction.test.tsx
This file was deleted.
Oops, something went wrong.
69 changes: 67 additions & 2 deletions
69
packages/design/src/config-provider/__tests__/static-function.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters