import { IconCaretdown, IconCheckboxTick, IconRowsStroked, } from "@douyinfe/semi-icons"; import { Dropdown } from "@douyinfe/semi-ui"; import { useFullscreen, useLayout } from "../../hooks"; import { enterFullscreen, exitFullscreen } from "../../utils/fullscreen"; import { useTranslation } from "react-i18next"; export default function LayoutDropdown() { const fullscreen = useFullscreen(); const { layout, setLayout } = useLayout(); const { t } = useTranslation(); const invertLayout = (component) => setLayout((prev) => ({ ...prev, [component]: !prev[component] })); return ( :
} onClick={() => invertLayout("header")} > {t("header")} :
} onClick={() => invertLayout("sidebar")} > {t("sidebar")} :
} onClick={() => invertLayout("issues")} > {t("issues")} :
} onClick={() => { if (fullscreen) { exitFullscreen(); } else { enterFullscreen(); } }} > {t("fullscreen")} } trigger="click" >
); }