Make toggle buttons more inline with rest of buttons
This commit is contained in:
@@ -1,18 +1,21 @@
|
|||||||
import { SessionContext } from "@/app/context/Context";
|
import { SessionContext } from "@/app/context/Context";
|
||||||
import { ToggleButton, Tooltip } from "@mui/material";
|
import { Button, Tooltip } from "@mui/material";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
export const CompactModeButton = () => {
|
export const CompactModeButton = () => {
|
||||||
const { compactMode, toggleCompactMode } = useContext(SessionContext);
|
const { compactMode, toggleCompactMode } = useContext(SessionContext);
|
||||||
return (
|
return (
|
||||||
<Tooltip title="Toggle compact layout for widescreen">
|
<Tooltip title="Toggle compact layout for widescreen">
|
||||||
<ToggleButton
|
<Button
|
||||||
value="check"
|
style={{
|
||||||
selected={compactMode}
|
backgroundColor: compactMode
|
||||||
onChange={toggleCompactMode}
|
? "rgba(144, 202, 249, 0.08)"
|
||||||
|
: "inherit",
|
||||||
|
}}
|
||||||
|
onClick={toggleCompactMode}
|
||||||
>
|
>
|
||||||
Compact mode
|
Compact mode
|
||||||
</ToggleButton>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -1,18 +1,15 @@
|
|||||||
import { SessionContext } from "@/app/context/Context";
|
import { SessionContext } from "@/app/context/Context";
|
||||||
import { ToggleButton, Tooltip } from "@mui/material";
|
import { Button, Tooltip } from "@mui/material";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
export const PlanModeButton = () => {
|
export const PlanModeButton = () => {
|
||||||
const { planMode, togglePlanMode } = useContext(SessionContext);
|
const { planMode, togglePlanMode } = useContext(SessionContext);
|
||||||
return (
|
return (
|
||||||
<Tooltip title="Toggle plan mode that show layout for widescreen">
|
<Tooltip title="Toggle plan mode that show layout for widescreen">
|
||||||
<ToggleButton
|
<Button onClick={togglePlanMode} style={{backgroundColor: planMode ? 'rgba(144, 202, 249, 0.08)' : 'inherit'}}>
|
||||||
value="check"
|
|
||||||
selected={planMode}
|
|
||||||
onChange={togglePlanMode}
|
|
||||||
>
|
|
||||||
Plan mode
|
Plan mode
|
||||||
</ToggleButton>
|
|
||||||
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user