{"ast":null,"code":"var __jsx = React.createElement;\nimport React from 'react';\nimport { dangerActiveColor, dangerColor, dangerFocusedColor, ellipsis, em, half, primaryActiveColor, primaryColor, primaryFocusedColor, textInvertColor, transitionProps } from '~/utils/style';\nimport RawIcon from '~/components/Icon';\nimport styled from 'styled-components';\nvar height = em(36);\nvar colors = {\n  primary: {\n    \"default\": primaryColor,\n    active: primaryActiveColor,\n    focused: primaryFocusedColor\n  },\n  danger: {\n    \"default\": dangerColor,\n    active: dangerActiveColor,\n    focused: dangerFocusedColor\n  }\n};\nvar Wrapper = styled.a.withConfig({\n  displayName: \"Button__Wrapper\",\n  componentId: \"huj3qe-0\"\n})([\"cursor:pointer;height:\", \";line-height:\", \";border-radius:\", \";background-color:\", \";color:\", \";display:block;text-align:center;\", \" \", \" &:hover,&:focus{background-color:\", \";}&:active{background-color:\", \";}\"], height, height, half(height), function (props) {\n  return colors[props.type][\"default\"];\n}, textInvertColor, transitionProps('background-color'), ellipsis(), function (props) {\n  return colors[props.type].focused;\n}, function (props) {\n  return colors[props.type].active;\n});\nvar Icon = styled(RawIcon).withConfig({\n  displayName: \"Button__Icon\",\n  componentId: \"huj3qe-1\"\n})([\"margin-right:4px;\"]);\n\nvar Button = function Button(_ref) {\n  var icon = _ref.icon,\n      type = _ref.type,\n      children = _ref.children,\n      className = _ref.className,\n      onClick = _ref.onClick;\n  return __jsx(Wrapper, {\n    className: className,\n    onClick: onClick,\n    type: type || 'primary'\n  }, icon && __jsx(Icon, {\n    type: icon\n  }), children);\n};\n\nexport default Button;","map":null,"metadata":{},"sourceType":"module"}