You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/content/4.2/components/modal.mdx
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: React Modal Component
3
3
name: Modal
4
-
description: React Modal component offers a lightweight, multi-purpose popup to add dialogs to yours. Learn how to customize React CoreUI Modals easily. Multiple examples and tutorial.
4
+
description: React Modal component offers a lightweight, multi-purpose popup to add dialogs to yours. Learn how to customize CoreUI React modal components easily. Multiple examples and tutorial.
5
5
menu: Components
6
6
route: /components/modal
7
7
---
@@ -19,11 +19,11 @@ import {
19
19
CTooltip,
20
20
} from'@coreui/react/src/index'
21
21
22
-
## Examples
22
+
## How to use React Modal Component?
23
23
24
-
### Modal components
24
+
### Static modal component example
25
25
26
-
Below is a static modal example (meaning its `position` and `display` have been overridden). Included are the modal header, modal body (required for `padding`), and modal footer (optional). We ask that you include modal headers with dismiss actions whenever possible, or provide another explicit dismiss action.
26
+
Below is a static react modal component example (meaning its `position` and `display` have been overridden). Included are the modal header, modal body (required for `padding`), and modal footer (optional). We ask that you include react modal headers with dismiss actions whenever possible, or provide another explicit dismiss action.
27
27
28
28
<Example>
29
29
<CModal
@@ -34,9 +34,9 @@ Below is a static modal example (meaning its `position` and `display` have been
34
34
visible
35
35
>
36
36
<CModalHeader>
37
-
<CModalTitle>Modal title</CModalTitle>
37
+
<CModalTitle>React Modal title</CModalTitle>
38
38
</CModalHeader>
39
-
<CModalBody>Modal body text goes here.</CModalBody>
39
+
<CModalBody>React Modal body text goes here.</CModalBody>
40
40
<CModalFooter>
41
41
<CButtoncolor="secondary">Close</CButton>
42
42
<CButtoncolor="primary">Save changes</CButton>
@@ -53,9 +53,9 @@ Below is a static modal example (meaning its `position` and `display` have been
53
53
visible
54
54
>
55
55
<CModalHeader>
56
-
<CModalTitle>Modal title</CModalTitle>
56
+
<CModalTitle>React Modal title</CModalTitle>
57
57
</CModalHeader>
58
-
<CModalBody>Modal body text goes here.</CModalBody>
58
+
<CModalBody>React Modal body text goes here.</CModalBody>
59
59
<CModalFooter>
60
60
<CButton color="secondary">Close</CButton>
61
61
<CButton color="primary">Save changes</CButton>
@@ -65,7 +65,7 @@ Below is a static modal example (meaning its `position` and `display` have been
65
65
66
66
### Live demo
67
67
68
-
Toggle a working modal demo by clicking the button below. It will slide down and fade in from the top of the page.
68
+
Toggle a working React modal component demo by clicking the button below. It will slide down and fade in from the top of the page.
69
69
70
70
exportconst LiveDemoExample = () => {
71
71
const [visible, setVisible] =useState(false)
@@ -115,7 +115,7 @@ return (
115
115
116
116
### Static backdrop
117
117
118
-
If you set a `backdrop` to `static`, your modal will behave as though the backdrop is static, meaning it will not close when clicking outside it. Click the button below to try it.
118
+
If you set a `backdrop` to `static`, your React modal component will behave as though the backdrop is static, meaning it will not close when clicking outside it. Click the button below to try it.
119
119
120
120
export const StaticBackdropExample = () => {
121
121
const [visible, setVisible] = useState(false)
@@ -375,7 +375,7 @@ return (
375
375
)
376
376
```
377
377
378
-
You can also create a scrollable modal that allows scroll the modal body by adding `scrollable` prop.
378
+
You can also create a scrollable react modal component that allows scroll the modal body by adding `scrollable` prop.
Add `alignment="center` to `<CModal>` to vertically center the modal.
586
+
Add `alignment="center` to `<CModal>` to vertically center the React modal.
587
587
588
588
export const VerticallyCenteredExample = () => {
589
589
const [visible, setVisible] = useState(false)
@@ -729,7 +729,7 @@ return (
729
729
730
730
### Tooltips and popovers
731
731
732
-
`<CTooltips>` and `<CPopovers>` can be placed within modals as needed. When modals are closed, any tooltips and popovers within are also automatically dismissed.
732
+
`<CTooltips>` and `<CPopovers>` can be placed within react modals as needed. When modal components are closed, any tooltips and popovers within are also automatically dismissed.
733
733
734
734
export const TooltipsAndPopoversExample = () => {
735
735
const [visible, setVisible] = useState(false)
@@ -933,7 +933,7 @@ return (
933
933
934
934
## Fullscreen Modal
935
935
936
-
Another override is the option to pop up a modal that covers the user viewport, available via property `fullscrean`.
936
+
Another override is the option to pop up a React modal component that covers the user viewport, available via property `fullscrean`.
0 commit comments