Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user