title: Creating a Button component in Typescript
body: <p>I have to create a button component for my school project that should have an edit, cancel , save  (&quot;Save&quot; should be shown in dropdown when clicking &quot;...&quot;). Everything should be in typescript and i have never had experience with TS (only React). Can someone help me like where should I start and so on. Every little help is appreciated even if it's one line of code or a youtube channel. There is not so much info out there about TS.  This is what I have come up until now.</p>
  <pre><code>import React from &quot;react&quot;;
  //import &quot;./Buttons.scss&quot;;
  
  type Props = {
     color: string
     open: boolean
     //hideCancelBtn?: boolean
     isValid: boolean
     buttonTitle?: string;
  
  
  };
  export default function ButtonComponent (props: Props): JSX.Element {
     const {color, open, hideCancelBtn, isValid, buttonTitle } = props
  }
  
  //en handleclick function 
   
  return (
  &lt;div className=&quot;AllButtons&quot;&gt;
  &lt;div className=&quot;cancel&quot;&gt;
  &lt;Button
             className=&quot;button button--grey button--row-margin&quot;
             disabled={publishBtnInactive}
             onClick={onDraftClick}
           &gt;
             cancel
           &lt;/Button&gt;
  &lt;/div&gt;
  .........
  &lt;/div&gt;
  
  
  
     
  ) ```
  </code></pre>