How to use the @chakra-ui/core.useDisclosure 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 checktheroads / hyperglass / hyperglass / ui / components / Greeting.js View on Github external
const Greeting = ({ greetingConfig, content, onClickThrough }) => {
  const { isOpen, onOpen, onClose } = useDisclosure(true);
  const { colorMode } = useColorMode();

  const handleClick = () => {
    onClickThrough(true);
    onClose();
  };

  return (