duperelki

This commit is contained in:
wrzesinski-hubert 2020-08-30 10:42:52 +02:00
parent 9f531de1a5
commit 1e9e336ee9
3 changed files with 10 additions and 9 deletions

View File

@ -5,7 +5,6 @@ import { days, hours } from '../constants/index';
import styled from 'styled-components/macro'; import styled from 'styled-components/macro';
const SchedulerWrapper = styled.div` const SchedulerWrapper = styled.div`
margin-top: 20px;
border-collapse: collapse; border-collapse: collapse;
flex-grow: 1; flex-grow: 1;
`; `;
@ -18,7 +17,6 @@ const TableBody = styled.div`
const TableRow = styled.div` const TableRow = styled.div`
display: flex; display: flex;
flex-direction: row;
`; `;
const TableHead = styled.div` const TableHead = styled.div`
@ -33,8 +31,11 @@ interface TableCellProps {
const TableCell = styled.div<TableCellProps>` const TableCell = styled.div<TableCellProps>`
height: ${({ height }) => height}px; height: ${({ height }) => height}px;
border: 1px solid #ddd; border: 1px solid #ddd;
text-align: center; display: flex;
align-items: center;
justify-content: center;
flex: 1; flex: 1;
font-size: 24px;
`; `;
const T = styled.table` const T = styled.table`

View File

@ -13,7 +13,7 @@ const SchedulerEvent = styled.div<SchedulerEventProps>`
position: absolute; position: absolute;
top: ${({ cellTop }) => cellTop}px; top: ${({ cellTop }) => cellTop}px;
left: ${({ cellWidth, eventIndex }) => cellWidth + 5 + cellWidth * eventIndex}px; left: ${({ cellWidth, eventIndex }) => cellWidth + 5 + cellWidth * eventIndex}px;
width: ${({ cellWidth }) => (cellWidth * 2) / 3}px; width: ${({ cellWidth }) => (cellWidth * 2.5) / 3}px;
height: ${({ cellHeight }) => (cellHeight * 2 * 3) / 4}px; height: ${({ cellHeight }) => (cellHeight * 2 * 3) / 4}px;
background-color: lightblue; background-color: lightblue;
z-index: 2; z-index: 2;

View File

@ -1,10 +1,10 @@
export const days = [ export const days = [
"", "",
"poniedziałek", "Poniedziałek",
"wtorek", "Wtorek",
"środa", "Środa",
"czwartek", "Czwartek",
"piątek", "Piątek",
]; ];
export const hours = [ export const hours = [
"8:00", "8:00",