From 39083e6488e15bdb5ee02713e62c37718b0a4301 Mon Sep 17 00:00:00 2001 From: syn Date: Mon, 13 Jan 2020 22:16:16 +0300 Subject: [DIRTY AS FUCK] very initial commit --- src/RuzCard.js | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/RuzCard.js (limited to 'src/RuzCard.js') diff --git a/src/RuzCard.js b/src/RuzCard.js new file mode 100644 index 0000000..4b0a39a --- /dev/null +++ b/src/RuzCard.js @@ -0,0 +1,94 @@ +import React, { useState } from 'react'; +import { makeStyles, useTheme } from '@material-ui/core/styles'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import CardMedia from '@material-ui/core/CardMedia'; +import Typography from '@material-ui/core/Typography'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemAvatar from '@material-ui/core/ListItemAvatar'; +import ListItemText from '@material-ui/core/ListItemText'; +import { Button, useMediaQuery, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@material-ui/core'; + + +const useStyles = makeStyles(theme => ({ + card: { + display: 'flex', + }, + details: { + display: 'flex', + flexDirection: 'column', + }, + content: { + flex: '1 0 auto', + }, + inline: { + display: 'inline', + }, + seminarCard: { + color: 'limegreen', + }, + examCard: { + color: 'red', + }, +})); + + +function class_by_type (type, classes) { + let classname = null; + switch (type) { + case 'Семинар': + classname = classes.seminarCard; + break; + case 'Экзамен': + classname = classes.examCard; + break; + default: + return; + } + + return classname; +} + + +export default function RuzCard(props) { + const classes = useStyles(); + const theme = useTheme(); + const dialogFullScreen = useMediaQuery(theme.breakpoints.down('sm')); + const [open, setOpen] = useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + + return ( + + +
+ {props.item.beginLesson}
+ {props.item.endLesson} +
+
+ + {props.item.auditorium}
+ + {props.item.kindOfWork} + + + } + /> +
+ ) +} \ No newline at end of file -- cgit v1.2.1-18-gbd029