How to use the @chakra-ui/core.useColorModeValue function in @chakra-ui/core

To help you get started, weโ€™ve selected a few @chakra-ui/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github minskylab / supersense / observer / components / atoms / eventCard / index.tsx View on Github external
setTimeAgo(format(event.emittedAt, "en_US"));
        }, 1000);

        return () => {
            window.clearInterval(timer);
        };
    }, []);

    const eventKindToTitle = (eventKind: string): string => {
        eventKind[0].toUpperCase();
        const sPart = eventKind.substring(1).replace(/-/g, " ");
        return eventKind.substring(0, 1).toUpperCase() + sPart;
    };

    const borderColor = useColorModeValue(theme.colors.gray["900"], theme.colors.gray["600"]);
    const highLightColor = useColorModeValue(theme.colors.gray["50"], theme.colors.gray["700"]);

    return (
github minskylab / supersense / observer / components / atoms / eventCard / index.tsx View on Github external
const timer = setInterval(() => {
            setTimeAgo(format(event.emittedAt, "en_US"));
        }, 1000);

        return () => {
            window.clearInterval(timer);
        };
    }, []);

    const eventKindToTitle = (eventKind: string): string => {
        eventKind[0].toUpperCase();
        const sPart = eventKind.substring(1).replace(/-/g, " ");
        return eventKind.substring(0, 1).toUpperCase() + sPart;
    };

    const borderColor = useColorModeValue(theme.colors.gray["900"], theme.colors.gray["600"]);
    const highLightColor = useColorModeValue(theme.colors.gray["50"], theme.colors.gray["700"]);

    return (
github minskylab / supersense / observer / components / atoms / header / index.tsx View on Github external
const Header: FC = ({
    initialTitle,
    hashtag,
    onSettings,
    brand = "SUPERSENSE",
    lightColor = "teal.200",
    darkColor = "teal.700",
}: HeaderProps) => {
    const { colorMode, toggleColorMode } = useColorMode();

    const bgColor = useColorModeValue(lightColor, darkColor);

    const changeColorModeIcon = useColorModeValue(
        ,
        
    );

    return (
github minskylab / supersense / observer / components / atoms / header / index.tsx View on Github external
const Header: FC = ({
    initialTitle,
    hashtag,
    onSettings,
    brand = "SUPERSENSE",
    lightColor = "teal.200",
    darkColor = "teal.700",
}: HeaderProps) => {
    const { colorMode, toggleColorMode } = useColorMode();

    const bgColor = useColorModeValue(lightColor, darkColor);

    const changeColorModeIcon = useColorModeValue(
        ,
        
    );

    return (