File tree 8 files changed +48
-10
lines changed
8 files changed +48
-10
lines changed Original file line number Diff line number Diff line change 63
63
padding : 5px ;
64
64
}
65
65
66
+ .raw-data-area {
67
+ overflow-y : auto;
68
+ }
66
69
.add-div {
67
70
bottom : 0 ;
68
71
position : absolute;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import '../../../App.css';
3
3
import Fab from '@material-ui/core/Fab' ;
4
4
import AddIcon from '@material-ui/icons/Add' ;
5
5
import AddDialog from './AddDialog/AddDialog' ;
6
- import { getThemeProps } from '@material-ui/styles' ;
7
6
8
7
export default function Add ( props ) {
9
8
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import React from 'react';
2
2
import '../../../../App.css' ;
3
3
import Button from '@material-ui/core/Button' ;
4
4
import TextField from '@material-ui/core/TextField' ;
5
- import Autocomplete from '@material-ui/lab/Autocomplete' ;
6
5
import Dialog from '@material-ui/core/Dialog' ;
7
6
import DialogActions from '@material-ui/core/DialogActions' ;
8
7
import DialogContent from '@material-ui/core/DialogContent' ;
@@ -12,7 +11,6 @@ import 'date-fns';
12
11
import DateFnsUtils from '@date-io/date-fns' ;
13
12
import {
14
13
MuiPickersUtilsProvider ,
15
- KeyboardTimePicker ,
16
14
KeyboardDatePicker ,
17
15
} from '@material-ui/pickers' ;
18
16
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import '../../App.css';
3
3
import Graph from './Graph/Graph' ;
4
4
import Stats from './Stats/Stats' ;
5
5
import Add from './Add/Add'
6
- import Divider from '@material-ui/core/Divider' ;
7
6
import Options from './Options/Options'
8
7
9
8
class Content extends React . Component {
@@ -25,7 +24,7 @@ class Content extends React.Component {
25
24
< >
26
25
< div className = 'content' >
27
26
< Graph data = { this . props . data } valueType = { this . props . valueType } gym = { this . isGym ( ) } />
28
- < Options delete = { this . props . delete } />
27
+ < Options delete = { this . props . delete } title = { this . props . title } />
29
28
{ stats }
30
29
</ div >
31
30
< Add title = { this . props . title } newValue = { this . props . newValue } category = { this . props . category }
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import '../../../App.css' ;
3
3
import DeleteIcon from '@material-ui/icons/Delete' ;
4
+ import Wtf from './Wtf/Wtf' ;
4
5
5
6
export default function Options ( props ) {
6
7
8
+ const [ open , setOpen ] = React . useState ( false ) ;
9
+
10
+ const dialogClick = ( ) => {
11
+ setOpen ( true ) ;
12
+ } ;
13
+
14
+ const dialogClose = ( ) => {
15
+ setOpen ( false ) ;
16
+ } ;
17
+
18
+ const dialogDone = ( ) => {
19
+ props . delete ( ) ;
20
+ setOpen ( false ) ;
21
+ } ;
22
+
7
23
return (
8
24
< div className = "options" dir = "rtl" >
9
- < DeleteIcon onClick = { props . delete } />
25
+ < DeleteIcon onClick = { dialogClick } />
26
+ < Wtf open = { open } dialogClose = { dialogClose } dialogDone = { dialogDone } title = { props . title } />
10
27
</ div >
11
28
)
12
29
}
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import '../../../../App.css' ;
3
+ import Dialog from '@material-ui/core/Dialog' ;
4
+ import DialogActions from '@material-ui/core/DialogActions' ;
5
+ import DialogContent from '@material-ui/core/DialogContent' ;
6
+ import DialogContentText from '@material-ui/core/DialogContentText' ;
7
+ import DialogTitle from '@material-ui/core/DialogTitle' ;
8
+ import Button from '@material-ui/core/Button' ;
9
+
10
+ export default function Wtf ( props ) {
11
+
12
+ return (
13
+ < Dialog open = { props . open } onClose = { props . dialogClose } aria-labelledby = "form-dialog-title" >
14
+ < DialogTitle > Delete { props . title } ?</ DialogTitle >
15
+ < DialogActions >
16
+ < Button onClick = { props . dialogClose } color = "primary" className = "raw" > No</ Button >
17
+ < Button onClick = { props . dialogDone }
18
+ color = "primary" >
19
+ Delete
20
+ </ Button >
21
+ </ DialogActions >
22
+ </ Dialog >
23
+ )
24
+ }
25
+
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default function DataDialog(props) {
17
17
return (
18
18
< Dialog open = { props . open } onClose = { props . dialogClose } aria-labelledby = "form-dialog-title" >
19
19
< DialogTitle > Raw data:</ DialogTitle >
20
- < DialogContent >
20
+ < DialogContent className = "raw-data-area" >
21
21
{ fields }
22
22
</ DialogContent >
23
23
< DialogActions >
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import '../../App.css' ;
3
- import { makeStyles } from '@material-ui/core/styles' ;
4
3
import AppBar from '@material-ui/core/AppBar' ;
5
4
import Toolbar from '@material-ui/core/Toolbar' ;
6
5
import Typography from '@material-ui/core/Typography' ;
7
6
import Button from '@material-ui/core/Button' ;
8
- import IconButton from '@material-ui/core/IconButton' ;
9
- import MenuIcon from '@material-ui/icons/Menu' ;
10
7
import Menu from '@material-ui/core/Menu' ;
11
8
import MenuItem from '@material-ui/core/MenuItem' ;
12
9
import FormDialog from './Dialog/Dialog' ;
You can’t perform that action at this time.
0 commit comments