``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
32 lines
719 B
TypeScript
32 lines
719 B
TypeScript
import SettingsIcon from "@mui/icons-material/Settings";
|
|
import Button from "@mui/material/Button";
|
|
|
|
import { useSidebar } from "~/contexts/Sidebar";
|
|
import { PaneComponentEnum } from "~/subApps/sheet/components/Sidebar/types";
|
|
|
|
interface Props {
|
|
context: string;
|
|
isReadonly: boolean;
|
|
}
|
|
|
|
const SettingsButton: React.FC<Props> = ({ context, isReadonly }) => {
|
|
const {
|
|
pane: { paneHistoryPush },
|
|
} = useSidebar();
|
|
return !isReadonly ? (
|
|
<Button
|
|
onClick={(evt) => {
|
|
paneHistoryPush(PaneComponentEnum.SETTINGS, {
|
|
context,
|
|
});
|
|
}}
|
|
variant="text"
|
|
startIcon={<SettingsIcon />}
|
|
>
|
|
Settings
|
|
</Button>
|
|
) : null;
|
|
};
|
|
|
|
export default SettingsButton;
|