/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors
*
* SPDX-License-Identifier: EPL-2.0
*/
import CodeIcon from '@mui/icons-material/Code';
import SchemaRoundedIcon from '@mui/icons-material/SchemaRounded';
import TableChartIcon from '@mui/icons-material/TableChart';
import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import { observer } from 'mobx-react-lite';
import type ThemeStore from './theme/ThemeStore';
function PaneButtons({
themeStore,
hideLabel,
}: {
themeStore: ThemeStore;
hideLabel?: boolean;
}): JSX.Element {
return (
{
if (event.shiftKey || event.ctrlKey) {
themeStore.setSelectedPane('code');
} else {
themeStore.toggleCode();
}
}}
>
{!hideLabel && 'Code'}
{
if (event.shiftKey || event.ctrlKey) {
themeStore.setSelectedPane('graph');
} else {
themeStore.toggleGraph();
}
}}
>
{!hideLabel && 'Graph'}
{
if (event.shiftKey || event.ctrlKey) {
themeStore.setSelectedPane('table');
} else {
themeStore.toggleTable();
}
}}
>
{!hideLabel && 'Table'}
);
}
PaneButtons.defaultProps = {
hideLabel: false,
};
export default observer(PaneButtons);