title: make animation for button appear and dissapear with scale
body: <p>I am trying to make a css animation for my website, but i am not able to make it well.
  My problem is the next:
  I want to add a button that when appears scale 0 to 1, and when disappears has to scale 1 to 0, my code:</p>
  <pre><code>const Button = styled.button`
    -webkit-animation: fadeout 0.5s linear;
    display: ${({ hidden }) =&gt; hidden &amp;&amp; 'none'};
    animation: createBox 0.4s ease-in-out;
  
    @keyframes createBox {
      from {
        transform: scale(0);
      }
      to {
        transform: scale(1);
      }
    }
  
  `;
  
  </code></pre>
  <p>What I would like is that when the button disappears it scale 1 to 0 but i dont find the way to make it,
  thanks for any help</p>