mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 08:14:06 +10:00
* Share - WIP * - public attachment links - WIP * WIP * WIP * Share - WIP * WIP * WIP * include userRole in space object * WIP * Server render shared page meta tags * disable user select * Close Navbar on outside click on mobile * update shared page spaceId * WIP * fix * close sidebar on click * close sidebar * defaults * update copy * Store share key in lowercase * refactor page breadcrumbs * Change copy * add link ref * open link button * add meta og:title * add twitter tags * WIP * make shares/info endpoint public * fix * * add /p/ segment to share urls * minore fixes * change mobile breadcrumb icon
29 lines
799 B
TypeScript
29 lines
799 B
TypeScript
import {
|
|
ActionIcon,
|
|
Tooltip,
|
|
useComputedColorScheme,
|
|
useMantineColorScheme,
|
|
} from "@mantine/core";
|
|
import { IconMoon, IconSun } from "@tabler/icons-react";
|
|
import classes from "./theme-toggle.module.css";
|
|
|
|
export function ThemeToggle() {
|
|
const { setColorScheme } = useMantineColorScheme();
|
|
const computedColorScheme = useComputedColorScheme();
|
|
|
|
return (
|
|
<Tooltip label="Toggle Color Scheme">
|
|
<ActionIcon
|
|
variant="default"
|
|
onClick={() => {
|
|
setColorScheme(computedColorScheme === "light" ? "dark" : "light");
|
|
}}
|
|
aria-label="Toggle color scheme"
|
|
>
|
|
<IconSun className={classes.light} size={18} stroke={1.5} />
|
|
<IconMoon className={classes.dark} size={18} stroke={1.5} />
|
|
</ActionIcon>
|
|
</Tooltip>
|
|
);
|
|
}
|