UNPKG

@deep-foundation/deepcase

Version:

[![Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/deep-foundation/deepcase) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label&color=purple)](https://discord.gg/deep-

12 lines 721 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useColorMode, useColorModeValue, IconButton, } from "@chakra-ui/react"; import { SunIcon, MoonIcon } from '@chakra-ui/icons'; export const ColorModeSwitcher = () => { const text = useColorModeValue("dark", "light"); const SwitchIcon = useColorModeValue(MoonIcon, SunIcon); const { colorMode, toggleColorMode } = useColorMode(); return (_jsx(IconButton, { sx: { position: 'fixed', right: 0, top: 0 }, size: "md", fontSize: "lg", variant: "ghost", color: "current", marginLeft: "2", onClick: toggleColorMode, icon: _jsx(SwitchIcon, {}), "aria-label": `Switch to ${text} mode` })); }; //# sourceMappingURL=color-mode-toggle.js.map