Commit 5273a35f authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

Moved card from inside components to DashboardTile

parent be2e137c
import React from "react";
import { IconButton } from "@material-ui/core";
import { Card, IconButton } from "@material-ui/core";
import ZoomOutIcon from "@material-ui/icons/ZoomOut";
import ZoomInIcon from "@material-ui/icons/ZoomIn";
import { useStyles } from "../../styles";
export const DashboardTile = (props) => {
const [input, dispatch] = props.reducer;
const {area, content, showNext} = props;
const classes = useStyles();
return (
<>
<IconButton
onClick={() => dispatch({type: "TOGGLE_STATE", payload: {toggledField: `${area}IsBig`}})
}
style={{backgroundColor: "rgba(171,134,97,0.18)", position: "relative", left: "20px", top: "70px"}}
>
{input[`${area}IsBig`]
? <ZoomOutIcon/>
: <ZoomInIcon/>
}
</IconButton>
{content}
<Card className={classes.card}>
<IconButton
onClick={() => dispatch({type: "TOGGLE_STATE", payload: {toggledField: `${area}IsBig`}})
}
style={{backgroundColor: "rgba(171,134,97,0.18)"/*, position: "relative", left: "20px", top: "70px"*/}}
>
{input[`${area}IsBig`]
? <ZoomOutIcon/>
: <ZoomInIcon/>
}
</IconButton>
{content}
</Card>
{showNext}
</>
)
);
}
\ No newline at end of file
import React from "react";
import { useTranslation } from "react-i18next";
import { useStyles } from "../../styles";
import { Card, Grid, List, ListItem } from "@material-ui/core";
import { Grid, List, ListItem } from "@material-ui/core";
export const DataSources = () => {
const { t, i18n } = useTranslation();
......@@ -9,7 +9,7 @@ export const DataSources = () => {
const classes = useStyles();
return (
<Card className={classes.card}>
<>
<Grid className={classes.gridHead} item container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Data sources')}</h3>
......@@ -25,6 +25,6 @@ export const DataSources = () => {
</List>
</Grid>
</Grid>
</Card>
</>
)
};
import React from "react";
import { Card, Grid } from "@material-ui/core";
import { Grid } from "@material-ui/core";
import { useTranslation } from "react-i18next";
import { useStyles } from "../../styles";
......@@ -9,7 +9,7 @@ export const Histogram = () => {
const classes = useStyles();
return (
<Card className={classes.card}>
<>
<Grid className={classes.gridHead} item container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Temporal distribution')}</h3>
......@@ -20,6 +20,6 @@ export const Histogram = () => {
Here will be the histogram...
</Grid>
</Grid>
</Card>
</>
)
};
import React from "react";
import { useTranslation } from "react-i18next";
import { useStyles } from "../../styles";
import { Card, Grid, List, ListItem } from "@material-ui/core";
import { Grid, List, ListItem } from "@material-ui/core";
export const ImageContents = (props) => {
const { contents } = props;
......@@ -23,7 +23,7 @@ export const ImageContents = (props) => {
}
return (
<Card className={classes.card}>
<>
<Grid className={classes.gridHead} item container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Image contents')}</h3>
......@@ -53,6 +53,6 @@ export const ImageContents = (props) => {
)}
</Grid>
</Grid>
</Card>
</>
)
};
......@@ -3,10 +3,8 @@ import { Circle, Map, Rectangle, TileLayer } from 'react-leaflet';
import MarkerClusterGroup from "react-leaflet-markercluster";
import { CreateMarkers } from '..'
import { useTranslation } from "react-i18next";
import { Card, FormLabel, Grid, IconButton, Switch, Tooltip } from "@material-ui/core";
import { FormLabel, Grid, Switch, Tooltip } from "@material-ui/core";
import MapIcon from "@material-ui/icons/Map";
import ZoomInIcon from '@material-ui/icons/ZoomIn';
import ZoomOutIcon from '@material-ui/icons/ZoomOut';
import { useStyles } from '../../styles';
import { makeStyles } from "@material-ui/core/styles";
......@@ -48,7 +46,7 @@ export const OurMap = (props) => {
},[input.areaCIsBig])
return (
<Card className={classes.card}>
<>
<Grid className={classes.gridHead} item container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Map')}</h3>
......@@ -201,6 +199,6 @@ export const OurMap = (props) => {
}
</Map>
</Grid>
</Card>
</>
)
}
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import { Card, FormControl, Grid, InputLabel, MenuItem, Select } from "@material-ui/core";
import { FormControl, Grid, InputLabel, MenuItem, Select } from "@material-ui/core";
import { useTranslation } from "react-i18next";
import { CreateTimelineAxis, CreateTimelineObjects } from '..'
import * as d3 from "d3";
......@@ -27,7 +27,7 @@ export const OurTimeline = (props) => {
return (
<Card className={classes.card}>
<>
<Grid className={classes.gridHead} item container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Timeline')}</h3>
......@@ -122,6 +122,6 @@ export const OurTimeline = (props) => {
//: <Skeleton variant="rect" width="100%" height="70%" />
}
</Grid>}
</Card>
</>
);
};
import React from 'react';
import { Button, Card, Grid, Table, TableBody, TableCell, TableHead, TableRow } from "@material-ui/core";
import { Button, Grid, Table, TableBody, TableCell, TableHead, TableRow } from "@material-ui/core";
import { ResultsTableRow } from '..'
import { useTranslation } from "react-i18next";
import { useStyles } from '../../styles';
......@@ -17,7 +17,7 @@ export const ResultsTable = (props) => {
const classes = useStyles();
return (
<Card className={classes.card}>
<>
{<Grid className={classes.gridHead} item xs={12} container direction="row" spacing={2}>
<Grid item>
<h3 className={classes.h3}>{t('Search results')}</h3>
......@@ -180,6 +180,6 @@ export const ResultsTable = (props) => {
</Table>}
</Grid>}
</Grid>}
</Card>
</>
)
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment