move cards styles to common file
parent
c155489a7d
commit
352f5468f7
|
@ -0,0 +1,17 @@
|
||||||
|
const styles = (theme) => ({
|
||||||
|
expand: {
|
||||||
|
transform: "rotate(0deg)",
|
||||||
|
marginLeft: "auto",
|
||||||
|
transition: theme.transitions.create("transform", {
|
||||||
|
duration: theme.transitions.duration.shortest
|
||||||
|
})
|
||||||
|
},
|
||||||
|
expandOpen: {
|
||||||
|
transform: "rotate(180deg)"
|
||||||
|
},
|
||||||
|
avatar: {
|
||||||
|
backgroundColor: theme.palette.primary.main
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default styles;
|
|
@ -13,22 +13,9 @@ import FavoriteIcon from "@material-ui/icons/Favorite";
|
||||||
import ShareIcon from "@material-ui/icons/Share";
|
import ShareIcon from "@material-ui/icons/Share";
|
||||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||||
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
||||||
|
import styles from "../../../components/common/styles/expandableCardStyles";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles(styles);
|
||||||
expand: {
|
|
||||||
transform: "rotate(0deg)",
|
|
||||||
marginLeft: "auto",
|
|
||||||
transition: theme.transitions.create("transform", {
|
|
||||||
duration: theme.transitions.duration.shortest
|
|
||||||
})
|
|
||||||
},
|
|
||||||
expandOpen: {
|
|
||||||
transform: "rotate(180deg)"
|
|
||||||
},
|
|
||||||
avatar: {
|
|
||||||
backgroundColor: "#F15B2A"
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
const AboutComponent = () => {
|
const AboutComponent = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
|
@ -13,22 +13,9 @@ import FavoriteIcon from "@material-ui/icons/Favorite";
|
||||||
import ShareIcon from "@material-ui/icons/Share";
|
import ShareIcon from "@material-ui/icons/Share";
|
||||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||||
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
||||||
|
import styles from "../../../components/common/styles/expandableCardStyles";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles(styles);
|
||||||
expand: {
|
|
||||||
transform: "rotate(0deg)",
|
|
||||||
marginLeft: "auto",
|
|
||||||
transition: theme.transitions.create("transform", {
|
|
||||||
duration: theme.transitions.duration.shortest
|
|
||||||
})
|
|
||||||
},
|
|
||||||
expandOpen: {
|
|
||||||
transform: "rotate(180deg)"
|
|
||||||
},
|
|
||||||
avatar: {
|
|
||||||
backgroundColor: "#F15B2A"
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
const TechnologiesComponent = () => {
|
const TechnologiesComponent = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
|
@ -10,27 +10,12 @@ import Collapse from "@material-ui/core/Collapse";
|
||||||
import Avatar from "@material-ui/core/Avatar";
|
import Avatar from "@material-ui/core/Avatar";
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
import IconButton from "@material-ui/core/IconButton";
|
||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import FavoriteIcon from "@material-ui/icons/Favorite";
|
|
||||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||||
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
|
||||||
import ShareRoundedIcon from "@material-ui/icons/ShareRounded";
|
import ShareRoundedIcon from "@material-ui/icons/ShareRounded";
|
||||||
import ActiveSessionSummary from "./ActiveSessionSummary";
|
import ActiveSessionSummary from "./ActiveSessionSummary";
|
||||||
|
import styles from "../../../components/common/styles/expandableCardStyles";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles(styles);
|
||||||
expand: {
|
|
||||||
transform: "rotate(0deg)",
|
|
||||||
marginLeft: "auto",
|
|
||||||
transition: theme.transitions.create("transform", {
|
|
||||||
duration: theme.transitions.duration.shortest
|
|
||||||
})
|
|
||||||
},
|
|
||||||
expandOpen: {
|
|
||||||
transform: "rotate(180deg)"
|
|
||||||
},
|
|
||||||
avatar: {
|
|
||||||
backgroundColor: theme.palette.primary.main
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
const ActiveSessionComponent = ({ session }) => {
|
const ActiveSessionComponent = ({ session }) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
@ -49,8 +34,15 @@ const ActiveSessionComponent = ({ session }) => {
|
||||||
</Avatar>
|
</Avatar>
|
||||||
}
|
}
|
||||||
action={
|
action={
|
||||||
<IconButton aria-label="settings">
|
<IconButton
|
||||||
<MoreVertIcon />
|
className={clsx(classes.expand, {
|
||||||
|
[classes.expandOpen]: expanded
|
||||||
|
})}
|
||||||
|
onClick={handleExpandClick}
|
||||||
|
aria-expanded={expanded}
|
||||||
|
aria-label="show more"
|
||||||
|
>
|
||||||
|
<ExpandMoreIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
}
|
}
|
||||||
title={<strong>Active session</strong>}
|
title={<strong>Active session</strong>}
|
||||||
|
@ -59,21 +51,7 @@ const ActiveSessionComponent = ({ session }) => {
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<ActiveSessionSummary session={session} />
|
<ActiveSessionSummary session={session} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
<CardActions disableSpacing>
|
<CardActions disableSpacing></CardActions>
|
||||||
<IconButton aria-label="add to favorites">
|
|
||||||
<FavoriteIcon />
|
|
||||||
</IconButton>
|
|
||||||
<IconButton
|
|
||||||
className={clsx(classes.expand, {
|
|
||||||
[classes.expandOpen]: expanded
|
|
||||||
})}
|
|
||||||
onClick={handleExpandClick}
|
|
||||||
aria-expanded={expanded}
|
|
||||||
aria-label="show more"
|
|
||||||
>
|
|
||||||
<ExpandMoreIcon />
|
|
||||||
</IconButton>
|
|
||||||
</CardActions>
|
|
||||||
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography paragraph>Method:</Typography>
|
<Typography paragraph>Method:</Typography>
|
||||||
|
|
|
@ -14,22 +14,9 @@ import ShareIcon from "@material-ui/icons/Share";
|
||||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||||
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
import MoreVertIcon from "@material-ui/icons/MoreVert";
|
||||||
import DnsRoundedIcon from "@material-ui/icons/DnsRounded";
|
import DnsRoundedIcon from "@material-ui/icons/DnsRounded";
|
||||||
|
import styles from "../../../components/common/styles/expandableCardStyles";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles(styles);
|
||||||
expand: {
|
|
||||||
transform: "rotate(0deg)",
|
|
||||||
marginLeft: "auto",
|
|
||||||
transition: theme.transitions.create("transform", {
|
|
||||||
duration: theme.transitions.duration.shortest
|
|
||||||
})
|
|
||||||
},
|
|
||||||
expandOpen: {
|
|
||||||
transform: "rotate(180deg)"
|
|
||||||
},
|
|
||||||
avatar: {
|
|
||||||
backgroundColor: theme.palette.primary.main
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
const ServerComponent = () => {
|
const ServerComponent = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
Loading…
Reference in New Issue