import styled, { css } from 'styled-components/macro' import { devices } from 'config/devices' import { isMobileDevice } from 'config/userAgent' import { customScrollbar } from 'features/Common' import { T9n } from 'features/T9n' export const Wrapper = styled.div` padding-right: 14px; ${isMobileDevice ? css` overflow-y: auto; width: 100%; ${customScrollbar} ` : ''}; ` export const TabsWrapper = styled.div` padding: 0 30px; ${isMobileDevice ? css` padding: 0 5px; ` : ''}; ` type TabsGroupProps = { hasLessThanFourTabs?: boolean, } export const TabsGroup = styled.div.attrs({ role: 'tablist' })` display: flex; height: 45px; padding-top: 10px; ${({ hasLessThanFourTabs }) => (hasLessThanFourTabs ? css` height: 40px; ${Tab} { justify-content: center; flex-direction: row; gap: 5px; } ` : '')} ${isMobileDevice ? css` ` : ''}; ` export const Tab = styled.button.attrs({ role: 'tab' })` display: flex; flex-direction: column; justify-content: space-between; align-items: center; flex: 1; opacity: 0.4; cursor: pointer; border: none; background: none; &[aria-pressed="true"], :hover { opacity: 1; } ` type TabIconProps = { icon: 'watch' | 'plays' | 'players' | 'stats', } export const TabIcon = styled.div` width: 20px; height: 20px; background-image: url(/images/matchTabs/${({ icon }) => `${icon}.svg`}); background-repeat: no-repeat; background-position: center; background-size: contain; ${({ icon }) => (icon === 'players' ? css` background-size: 23px; ` : '')} ` export const TabTitle = styled(T9n)` font-size: 8px; text-transform: uppercase; color: ${({ theme }) => theme.colors.white}; ` type TContainer = { forWatchTab?: boolean, hasScroll: boolean, } export const Container = styled.div` width: 320px; margin-top: 23px; max-height: calc(100vh - 130px); overflow-y: ${({ forWatchTab }) => (forWatchTab ? 'hidden' : 'auto')}; padding-right: ${({ forWatchTab }) => (forWatchTab ? '0' : '')}; padding-left: 14px; padding-right: ${({ hasScroll }) => (hasScroll ? '10px' : '')}; ${customScrollbar} @media ${devices.tablet} { margin-top: 15px; } ${isMobileDevice ? css` padding: 0 5px; overflow-y: hidden; max-height: initial; @media (max-width: 750px){ width: 100%; } @media (orientation: landscape){ width: 100%; } ` : ''}; ` type ButtonProps = { active?: boolean, } export const Button = styled.button` border: none; outline: none; position: relative; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: linear-gradient( 180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100% ), #3F3F3F; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3); border-radius: 2px; ${({ disabled }) => ( disabled ? css` pointer-events: none; opacity: 0.5; ` : css` cursor: pointer; ` )} :hover { background-color: #555555; } @media ${devices.mobile} { justify-content: center; border-radius: 1.8px; } ${({ active, theme }) => { const bgColor = theme.colors.button const bgHoverColor = theme.colors.buttonHover return active ? css` background-color: ${bgColor}; &:hover { background-color: ${bgHoverColor}; } ` : '' }} ` export const Title = styled.span` font-weight: 600; font-size: 14px; max-width: 55%; line-height: 16px; color: #ffffff; overflow: hidden; white-space: nowrap; text-overflow:ellipsis; ` export const BlockTitle = styled.span` font-weight: 600; font-size: 12px; line-height: 18px; text-align: start; color: rgba(255, 255, 255, 0.5); text-transform: uppercase; `