Last change
on this file since efaa053 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 9 months ago |
images upload/download impl, other fixes
|
-
Property mode
set to
100644
|
File size:
942 bytes
|
Rev | Line | |
---|
[e6c2521] | 1 | import { useState } from 'react';
|
---|
| 2 | import Button from 'react-bootstrap/Button';
|
---|
| 3 | import Modal from 'react-bootstrap/Modal';
|
---|
| 4 |
|
---|
| 5 | function StaticExample() {
|
---|
| 6 | const [show, setShow] = useState(false);
|
---|
| 7 |
|
---|
| 8 | const handleClose = () => setShow(false);
|
---|
| 9 | const handleShow = () => setShow(true);
|
---|
| 10 |
|
---|
| 11 | return (
|
---|
| 12 | <>
|
---|
| 13 | <Button variant="primary" onClick={handleShow}>
|
---|
| 14 | Launch demo modal
|
---|
| 15 | </Button>
|
---|
| 16 |
|
---|
| 17 | <Modal show={show} onHide={handleClose}>
|
---|
| 18 | <Modal.Header closeButton>
|
---|
| 19 | <Modal.Title>Modal heading</Modal.Title>
|
---|
| 20 | </Modal.Header>
|
---|
| 21 | <Modal.Body>Woohoo, you are reading this text in a modal!</Modal.Body>
|
---|
| 22 | <Modal.Footer>
|
---|
| 23 | <Button variant="secondary" onClick={handleClose}>
|
---|
| 24 | Close
|
---|
| 25 | </Button>
|
---|
| 26 | <Button variant="primary" onClick={handleClose}>
|
---|
| 27 | Save Changes
|
---|
| 28 | </Button>
|
---|
| 29 | </Modal.Footer>
|
---|
| 30 | </Modal>
|
---|
| 31 | </>
|
---|
| 32 | );
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | export default StaticExample; |
---|
Note:
See
TracBrowser
for help on using the repository browser.