File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+
3+ const CircularProgress = props => (
4+ < div className = { `loader ${ props . className } ` } >
5+ < svg className = "circular" viewBox = "25 25 50 50" >
6+ < circle
7+ className = "path"
8+ cx = "50"
9+ cy = "50"
10+ r = "15"
11+ fill = "none"
12+ strokeWidth = "2"
13+ strokeMiterlimit = "10"
14+ />
15+ </ svg >
16+ </ div >
17+ ) ;
18+ export default CircularProgress ;
Original file line number Diff line number Diff line change 1+ import React , { useState } from "react" ;
2+ import { Modal , Button } from "react-bootstrap" ;
3+ import PropTypes from "prop-types" ;
4+
5+ const ModalComponent = props => {
6+ const [ show , setShow ] = useState ( false ) ;
7+
8+ const handleClose = ( ) => setShow ( false ) ;
9+ const handleShow = ( ) => setShow ( true ) ;
10+ const { heading, body } = props ;
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 > { heading } </ Modal . Title >
20+ </ Modal . Header >
21+ < Modal . Body > { body } </ 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+ ModalComponent . propTypes = {
35+ heading : PropTypes . String ,
36+ body : PropTypes . String
37+ } ;
38+ export default ModalComponent ;
You can’t perform that action at this time.
0 commit comments