| import React from 'react'
import styled from 'styled-components'
 
export default styled.div`
   cursor: pointer;
   z-index: 1;
   display: block;
 
  .layer {
    width: 20px;
    height: 2px;
    margin: 4px 0 0 0;
    padding: 0;
    background: #2870b2;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 1px;
  }
 
  .layer-1 {
    transform-origin: top right;
    width: 20px;
    transition: all 0.3s ease;
    margin-top: 0;
 
    ${p => p.active && `
      background: #2870b2;
      width: 10.5px;
      transform-origin: top right;
      -webkit-transform: translate(-4px, -1px) rotate(-45deg);
      -moz-transform: -4px -1px -45deg;
      -o-transform: -4px -1px -45deg;
      transform: -4px -1px -45deg;
      transition: all 0.3s ease;
    `}
  }
 
  .layer-2 {
    transform-origin: center left;
    width: 20px;
    transition: all 0.3s ease;
 
    ${p => p.active && `
      background: #2870b2;
      width: 18px;
      transform-origin: center left;
      -webkit-transition: all 0.3s ease;
      -o-transition: all 0.3s ease;
      transition: all 0.3s ease;
    `}
  }
 
  .layer-3 {
    transform-origin: bottom right;
    width: 20px;
    transition: all 0.3s ease;
 
    ${p => p.active && `
      background: #2870b2;
      width: 10.5px;
      transform-origin: bottom right;
      -webkit-transform: translate(-4px, 1px) rotate(45deg);
      -moz-transform: -4px 1px 45deg;
      -o-transform: -4px 1px 45deg;
      transform: -4px 1px 45deg;
      transition: all 0.3s ease;
    `}
  }
` |