UNPKG

@primer/components

Version:
18 lines (17 loc) 1.16 kB
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import { XIcon } from '@primer/octicons-react'; import React, { forwardRef } from 'react'; import styled from 'styled-components'; import { get } from '../constants'; import sx from '../sx'; const StyledButton = styled.button.withConfig({ displayName: "ButtonClose__StyledButton", componentId: "sc-13mzqph-0" })(["border:none;padding:0;background:transparent;outline:none;cursor:pointer;border-radius:", ";color:", ";&:focus{box-shadow:", ";}&:hover{color:", ";}", ";"], get('radii.2'), get('colors.fg.muted'), get('shadows.btn.focusShadow'), get('colors.accent.fg'), sx); const ButtonClose = /*#__PURE__*/forwardRef((props, ref) => { return /*#__PURE__*/React.createElement(StyledButton, _extends({ ref: ref, "aria-label": "Close" }, props), /*#__PURE__*/React.createElement(XIcon, null)); }); export default ButtonClose;