1
1
import { useState } from 'react' ;
2
- import { Button , Icon , Input , Skeleton , Card , Popover } from 'pivot-design' ;
2
+ import { Button , Icon , Input , Skeleton , Card , Popover , Modal } from 'pivot-design' ;
3
3
// import router from '@/routers';
4
4
import ButtonMdx from '../../components/Button/index.mdx' ;
5
5
import IconMdx from '../../components/Icon/index.mdx' ;
6
6
import InputMdx from '../../components/Input/index.mdx' ;
7
7
import CardMdx from '../../components/Card/index.mdx' ;
8
8
import SkeletonMdx from '../../components/Skeleton/index.mdx' ;
9
+ //import PopoverMdx from '@/components/Popover/index.mdx';
10
+ import ModalMdx from '../../components/Modal/index.mdx' ;
9
11
import PopoverMdx from '../../components/Popover/index.mdx' ;
10
12
import './index.scss' ;
11
13
12
14
import Draggable from '@/examples/Draggable/Draggable' ;
13
15
import CodeBlock from '@/components/_CodeBlock/codeBlock' ;
14
16
15
17
function Index ( ) {
16
- const [ select , setSelect ] = useState ( 'Draggable ' ) ;
18
+ const [ select , setSelect ] = useState ( 'Modal ' ) ;
17
19
const demoSelect = ( ) => {
18
20
return (
19
21
< div className = "demo-container" >
@@ -38,6 +40,9 @@ function Index() {
38
40
< div className = { `demo-item ${ select === 'Popover' ? 'active' : '' } ` } onClick = { ( ) => setSelect ( 'Popover' ) } >
39
41
气泡
40
42
</ div >
43
+ < div className = { `demo-item ${ select === 'Modal' ? 'active' : '' } ` } onClick = { ( ) => setSelect ( 'Modal' ) } >
44
+ 弹窗
45
+ </ div >
41
46
</ div >
42
47
) ;
43
48
} ;
@@ -53,8 +58,11 @@ function Index() {
53
58
{ select === 'Popover' ? < PopoverMdx components = { { Popover, CodeBlock } } /> : null }
54
59
{ select === 'Draggable' ? < Draggable /> : null }
55
60
{ select === 'Skeleton' ? < SkeletonMdx components = { { Skeleton, CodeBlock } } /> : null }
61
+ { select === 'Modal' ? < ModalMdx components = { { Modal, CodeBlock } } /> : null }
62
+ </ div >
63
+ < div className = "demo-component-catalogue" style = { { width : '200px' } } >
64
+ 1
56
65
</ div >
57
- < div className = "demo-component-catalogue" style = { { width : '200px' } } > 1</ div >
58
66
</ div >
59
67
) ;
60
68
}
0 commit comments