偏右
4 years ago
committed by
GitHub
11 changed files with 354 additions and 45 deletions
@ -0,0 +1,297 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`renders ./components/modal/demo/async.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open Modal with async logic |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/basic.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open Modal |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/button-props.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open Modal with customized button props |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/confirm.md correctly 1`] = ` |
|||
<div |
|||
class="ant-space ant-space-horizontal ant-space-align-center" |
|||
> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Confirm |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
With promise |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn ant-btn-dashed" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Delete |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
> |
|||
<button |
|||
class="ant-btn ant-btn-dashed" |
|||
type="button" |
|||
> |
|||
<span> |
|||
With extra props |
|||
</span> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/confirm-router.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Confirm |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/dark.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open Modal |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/footer.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open Modal with customized footer |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/hooks.md correctly 1`] = ` |
|||
<div |
|||
class="ant-space ant-space-horizontal ant-space-align-center" |
|||
> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Confirm |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Warning |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Info |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Error |
|||
</span> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/info.md correctly 1`] = ` |
|||
<div |
|||
class="ant-space ant-space-horizontal ant-space-align-center" |
|||
> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Info |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Success |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
style="margin-right:8px" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Error |
|||
</span> |
|||
</button> |
|||
</div> |
|||
<div |
|||
class="ant-space-item" |
|||
> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Warning |
|||
</span> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/locale.md correctly 1`] = ` |
|||
<div> |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Modal |
|||
</span> |
|||
</button> |
|||
<br /> |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Confirm |
|||
</span> |
|||
</button> |
|||
</div> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/manual.md correctly 1`] = ` |
|||
<button |
|||
class="ant-btn" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Open modal to close in 5s |
|||
</span> |
|||
</button> |
|||
`; |
|||
|
|||
exports[`renders ./components/modal/demo/position.md correctly 1`] = ` |
|||
Array [ |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Display a modal dialog at 20px to Top |
|||
</span> |
|||
</button>, |
|||
<br />, |
|||
<br />, |
|||
<button |
|||
class="ant-btn ant-btn-primary" |
|||
type="button" |
|||
> |
|||
<span> |
|||
Vertically centered modal dialog |
|||
</span> |
|||
</button>, |
|||
] |
|||
`; |
@ -0,0 +1,3 @@ |
|||
import demoTest from '../../../tests/shared/demoTest'; |
|||
|
|||
demoTest('modal'); |
Loading…
Reference in new issue