Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled, { css } from 'styled-components'
import { TimeBlockType } from '../../store/facilityBooking/types'

export const BLOCK_HEIGHT = 90
export const BLOCK_HEIGHT = 40
export const TOP_DISTANCE = 10
export const BLOCK_GAP = 5

Expand All @@ -10,10 +10,12 @@ export const DailyContainer = styled.div`
flex-direction: column;
padding: ${TOP_DISTANCE}px 5px;
gap: ${BLOCK_GAP}px;
overflow: hidden;
`

const blockStyles = css`
position: relative;
align-items: center;
border-radius: 10px;
padding: 10px 15px;
color: #000;
Expand Down
14 changes: 11 additions & 3 deletions frontend/src/components/FacilityBooking/ViewBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import React, { useEffect, useRef } from 'react'
import styled from 'styled-components'

import { TimeBlock } from '../../store/facilityBooking/types'
import { scrollToView } from './CurrentTimeLine'

import { StyledViewBooking } from './BlockStyles.styled'

const StyledBookingInfo = styled.span`
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
`

type Props = {
entry: TimeBlock
scrollTo?: boolean
Expand Down Expand Up @@ -65,9 +73,9 @@ const ViewBlock = (props: Props) => {
props.setViewBookingEntryId()
}}
>
{props.entry.ccaName}
<br />
{props.entry.eventName}
<StyledBookingInfo>
{props.entry.ccaName} - {props.entry.eventName}
</StyledBookingInfo>
</StyledViewBooking>
) : (
<StyledViewBooking ref={ref} isOccupied={false} blockId={props.entry.id} />
Expand Down