Skip to content

Commit

Permalink
Add card and table icons to button (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoelBiju committed Jul 20, 2021
1 parent 6c05c44 commit 7d69e2b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions packages/datagateway-dataview/src/page/pageContainer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import { StateType } from '../state/app.types';
import PageBreadcrumbs from './breadcrumbs.component';
import PageRouting from './pageRouting.component';
import { Location as LocationType } from 'history';
import ViewListIcon from '@material-ui/icons/ViewList';
import ViewAgendaIcon from '@material-ui/icons/ViewAgenda';

const usePaperStyles = makeStyles(
(theme: Theme): StyleRules =>
Expand Down Expand Up @@ -252,24 +254,12 @@ const ViewSwitch = (props: {
const [t] = useTranslation();

return (
// <FormControlLabel
// className="tour-dataview-toggle-card"
// value="start"
// control={
// <Switch
// checked={props.toggleCard}
// onChange={props.handleToggleChange}
// name="toggleCard"
// inputProps={{ 'aria-label': 'secondary checkbox' }}
// />
// }
// label={t('app.toggle_cards')}
// labelPlacement="start"
// />
<Button
className="tour-dataview-toggle-card"
variant="contained"
color="primary"
size="small"
startIcon={props.viewCards ? <ViewListIcon /> : <ViewAgendaIcon />}
onClick={props.handleButtonChange}
>
{props.viewCards ? t('app.view_table') : t('app.view_cards')}
Expand Down

0 comments on commit 7d69e2b

Please sign in to comment.