Skip to content

Commit 672bc38

Browse files
committed
Add UploadDialog.
1 parent d690519 commit 672bc38

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

src/routes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const About = React.lazy(() => import('./views/about/About'))
44
const Dashboard = React.lazy(() => import('./views/dashboard/Dashboard'))
55
const Colors = React.lazy(() => import('./views/theme/colors/Colors'))
66
const Typography = React.lazy(() => import('./views/theme/typography/Typography'))
7-
const Upload = React.lazy(() => import('./views/buttons/buttons/Buttons'))
7+
// const Upload = React.lazy(() => import('./views/notifications/modals/Modals'))
8+
const Upload = React.lazy(() => import('./views/upload-dialog/UploadDialog')) // /Users/zhouqiangw/Desktop/studio/coreui-react-admin/src/views/upload-dialog/index.js
89

910
// Base
1011
const Accordion = React.lazy(() => import('./views/base/accordion/Accordion'))
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React, { useState } from 'react'
2+
import {
3+
CButton,
4+
CLink,
5+
CModal,
6+
CModalHeader,
7+
CModalTitle,
8+
CModalBody,
9+
CPopover,
10+
CTooltip,
11+
CModalFooter,
12+
} from '@coreui/react'
13+
14+
const UploadDialog = () => {
15+
const [visible, setVisible] = useState(false)
16+
return (
17+
<>
18+
<CButton onClick={() => setVisible(!visible)}>Launch demo modal</CButton>
19+
<CModal alignment="center" visible={visible} onClose={() => setVisible(false)}>
20+
<CModalHeader>
21+
<CModalTitle>Modal title</CModalTitle>
22+
</CModalHeader>
23+
<CModalBody>
24+
<h5>Popover in a modal</h5>
25+
<p>
26+
This
27+
<CPopover title="Popover title" content="Popover body content is set in this property.">
28+
<CButton>button</CButton>
29+
</CPopover>{' '}
30+
triggers a popover on click.
31+
</p>
32+
<hr />
33+
<h5>Tooltips in a modal</h5>
34+
<p>
35+
<CTooltip content="Tooltip">
36+
<CLink>This link</CLink>
37+
</CTooltip>{' '}
38+
and
39+
<CTooltip content="Tooltip">
40+
<CLink>that link</CLink>
41+
</CTooltip>{' '}
42+
have tooltips on hover.
43+
</p>
44+
</CModalBody>
45+
<CModalFooter>
46+
<CButton color="secondary" onClick={() => setVisible(false)}>
47+
Close
48+
</CButton>
49+
<CButton color="primary">Save changes</CButton>
50+
</CModalFooter>
51+
</CModal>
52+
</>
53+
)
54+
}
55+
56+
export default UploadDialog

0 commit comments

Comments
 (0)