UNPKG

@primer/components

Version:
24 lines (21 loc) 1.23 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 React from 'react'; import styled, { css } from 'styled-components'; import { get } from '../constants'; import sx from '../sx'; const tabWrapperStyles = css(["display:flex;flex-shrink:0;margin-bottom:-1px;-webkit-overflow-scrolling:touch;overflow-x:auto;overflow-y:hidden;&::-webkit-scrollbar{display:none;}@media (min-width:", "){padding:0 ", ";margin-top:", ";}"], get('breakpoints.0'), get('space.2'), get('space.3')); const SelectMenuTabsBase = styled.div.withConfig({ displayName: "SelectMenuTabs__SelectMenuTabsBase", componentId: "sc-kgg21o-0" })(["", " ", ";"], tabWrapperStyles, sx); const SelectMenuTabs = ({ children, ...rest }) => { return /*#__PURE__*/React.createElement(SelectMenuTabsBase, _extends({ role: "tablist" }, rest), children); }; SelectMenuTabs.displayName = "SelectMenuTabs"; SelectMenuTabs.displayName = 'SelectMenu.Tabs'; export default SelectMenuTabs;