import React, { memo } from 'react' import { Flex, Box, css } from 'theme-ui' export interface MenuTriggerProps { active?: boolean onChange?: (value: boolean) => void } export const MenuTrigger: React.FunctionComponent = memo( ({ active, onChange }) => { const spanStyle = css({ position: 'absolute', height: '2px', width: '22px', background: 'currentColor', borderRadius: '2px', transition: 'default', willChange: 'transform,opacity' }) function toggle() { if (onChange) { onChange(!active) } } return ( ) } ) MenuTrigger.defaultProps = { active: false }