To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Verified Commit 4338f66b authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Change ExpansionPanel to Accordion

Naming has changed for the ExpansionPanel of MaterialUI to have a more
consistent naming scheme.
parent 1b9a94ec
Pipeline #82878 passed with stages
in 12 minutes and 59 seconds
import React from 'react'
import PropTypes from 'prop-types'
import {
ExpansionPanel,
ExpansionPanelDetails,
ExpansionPanelSummary,
Accordion,
AccordionDetails,
AccordionSummary,
} from '@material-ui/core'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import { makeStyles } from '@material-ui/styles'
......@@ -49,7 +49,7 @@ const FilteredListItem = React.forwardRef(
}
return (
<ExpansionPanel
<Accordion
component="li"
ref={ref}
classes={{
......@@ -61,7 +61,7 @@ const FilteredListItem = React.forwardRef(
TransitionProps={{ unmountOnExit: true }}
{...props}
>
<ExpansionPanelSummary
<AccordionSummary
classes={{
root: classes.summaryRoot,
content: classes.summaryContent,
......@@ -69,11 +69,11 @@ const FilteredListItem = React.forwardRef(
expandIcon={<ExpandMoreIcon />}
>
{summary}
</ExpansionPanelSummary>
<ExpansionPanelDetails classes={{ root: classes.detailsRoot }}>
</AccordionSummary>
<AccordionDetails classes={{ root: classes.detailsRoot }}>
{children}
</ExpansionPanelDetails>
</ExpansionPanel>
</AccordionDetails>
</Accordion>
)
}
)
......
......@@ -4,10 +4,10 @@ import { useSelector, useDispatch } from 'react-redux'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import Autocomplete from '@material-ui/lab/Autocomplete'
import {
ExpansionPanel,
ExpansionPanelSummary,
Accordion,
AccordionSummary,
Button,
ExpansionPanelDetails,
AccordionDetails,
Typography,
Toolbar,
Breadcrumbs,
......@@ -309,7 +309,7 @@ const StudydocumentsQuickFilter = ({ ...props }) => {
}
return (
<ExpansionPanel
<Accordion
component="div"
classes={{
root: classes.root,
......@@ -320,7 +320,7 @@ const StudydocumentsQuickFilter = ({ ...props }) => {
onChange={(_, isExpanded) => setExpanded(isExpanded)}
{...props}
>
<ExpansionPanelSummary
<AccordionSummary
classes={{
root: classes.summaryRoot,
expanded: classes.summaryExpanded,
......@@ -331,8 +331,8 @@ const StudydocumentsQuickFilter = ({ ...props }) => {
<Typography>
<FormattedMessage id="studydocuments.quickfilter.title" />
</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails classes={{ root: classes.detailsRoot }}>
</AccordionSummary>
<AccordionDetails classes={{ root: classes.detailsRoot }}>
<Toolbar disableGutters>
{breadcrumbs}
<div className={classes.toolbarSeparator} />
......@@ -341,8 +341,8 @@ const StudydocumentsQuickFilter = ({ ...props }) => {
</Button>
</Toolbar>
{content}
</ExpansionPanelDetails>
</ExpansionPanel>
</AccordionDetails>
</Accordion>
)
}
......
......@@ -6,9 +6,9 @@ import { makeStyles } from '@material-ui/core/styles'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import {
Typography,
ExpansionPanel,
ExpansionPanelDetails,
ExpansionPanelSummary,
Accordion,
AccordionDetails,
AccordionSummary,
} from '@material-ui/core'
import { listLoadNextPage, listLoadAllPages } from '~store/common/actions'
......@@ -121,8 +121,8 @@ const EventsPage = ({ eventId: eventIdProp }) => {
<EventsFilter />
{/* Event Calendar */}
<ExpansionPanel className={classes.calendarPanel}>
<ExpansionPanelSummary
<Accordion className={classes.calendarPanel}>
<AccordionSummary
classes={{
root: classes.calendarSummary,
}}
......@@ -131,16 +131,16 @@ const EventsPage = ({ eventId: eventIdProp }) => {
<Typography className={classes.heading}>
<FormattedMessage id="events.agenda" />
</Typography>
</ExpansionPanelSummary>
<ExpansionPanelDetails classes={{ root: classes.calendarDetails }}>
</AccordionSummary>
<AccordionDetails classes={{ root: classes.calendarDetails }}>
<iframe
src="https://calendar.google.com/calendar/embed?showTitle=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;height=600&amp;wkst=2&amp;bgcolor=%23FFFFFF&amp;src=mdk91hfvr18q8rrlh3sedlhgvo%40group.calendar.google.com&amp;color=%23B1365F&amp;ctz=Europe%2FZurich"
style={{ width: '100%', height: '550px', borderWidth: 0 }}
frameBorder="0"
scrolling="no"
/>
</ExpansionPanelDetails>
</ExpansionPanel>
</AccordionDetails>
</Accordion>
{/* Pinned event */}
{pinnedId && (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment