/** @jsxRuntime classic */ /** @jsx jsx */ import { FC, Fragment } from 'react'; import { useTheme, jsx, css } from '@emotion/react'; import { getIcon, Popup } from '..'; import { CourtsButton } from './chooseLayer'; import { IColors } from '../../types/theme'; import { ISpaceProps } from '../../SACalendar/types'; export const SpaceHorizontalView: FC = ({ state }) => { const colors = useTheme(); const noChildren = state.children.length === 0; return (
{getIcon('sport_tennis')} {getIcon('sport_vollyball', 'l')}
{state.name}
aide
}>
{noChildren ? (
{1}
) : ( state.children.map((space, index) => { const isLast = index + 1 === state.children.length; return (
{index + 1}
); }) )}
); }; export const spaceContainer = css` box-sizing: border-box; background: white; border-bottom: 1px solid #e2e7eb; flex-grow: 1; display: flex; // flex-direction: column; height: 100%; width: 148px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; .title { flex-grow: 1; // min-width: 100px; font-family: Montserrat; font-style: normal; font-weight: normal; font-size: 14px; line-height: 130%; color: #0d4774; max-width: max-content; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } `; export const spaceName = (colors: IColors, isLast: boolean) => css` font-family: Montserrat; font-style: normal; font-weight: 500; font-size: 12px; line-height: 17px; text-align: center; color: ${colors.tx_text_secondary}; flex-basis: 100%; border-bottom: ${isLast ? '1px solid white' : '1px solid #e2e7eb'}; background: #fafcfd; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; padding: 3.5px 0; display: flex; align-items: center; justify-content: center; width: 24px; box-sizing: border-box; `;