Developed with react and typescript.
Now the card is shown or hidden when you click on the div tag.
I want to hide the Card when it is displayed, even if another place other than the div tag is pressed.
import React, { FunctionComponent, useState } from 'react';
import { Card } from 'components/atoms/Card';
import { Display } from 'components/atoms/Display';
const Test: FunctionComponent = () => {
  const [isDisplay, setIsDisplay] = useState(false);
  const onClick = () => {
    setIsDisplay(!isDisplay);
  };
  return (
    <>
      <div onClick={onClick} style={{ width: '100px', height: '100px' }}>
        display Card
      </div>
      <Display enabled={isDisplay}>
        <Card width={100} height={100}></Card>
      </Display>
    </>
  );
};
export default Test;
 
    