title: How to specify a child component to drag its parent component in React?
body: <p>I'm currently working on a terminal emulator project using React and styled-components. I want to add dragging feature to the terminal. Everything is good, except one thing: I want to click and hold the title bar to drag the terminal, not somewhere else.</p>
  
  <p>Here is my base component: <a href="https://codesandbox.io/s/still-http-jxxex" rel="nofollow noreferrer">https://codesandbox.io/s/still-http-jxxex</a></p>
  
  <p>I don't want to use any plugins or libraries because I want to know how it works. So are there any ways to achieve this just by React and javascript? Every comments are appreciated to me.</p>