Skip to content

Commit

Permalink
Upgrades MUI version #96
Browse files Browse the repository at this point in the history
  • Loading branch information
amgoodfellow committed Dec 14, 2018
1 parent 01324ce commit b24b26b
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/api/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const getDemoEvents = async () => {
console.warn('Running in demo mode')
return await fetch(
'https://gist.githubusercontent.com/Aaron-G-9/33e35d1a86d401fc1a1e678dc66faf17/raw/52dbab0792e4e9a66b9cf1ea11c9d9099e8fa5ca/CalendarEvents.json'
'https://gist.githubusercontent.com/amgoodfellow/33e35d1a86d401fc1a1e678dc66faf17/raw/52dbab0792e4e9a66b9cf1ea11c9d9099e8fa5ca/CalendarEvents.json'
)
.then(response => response.json())
.then(response => response.events)
Expand Down
4 changes: 2 additions & 2 deletions src/components/DayBoxSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DayBoxSchedule extends Component {
calmeetin[this.props.month][this.props.day][i].color
}}
>
<Typography type="body2" className={classes.eventText}>
<Typography variant="body1" className={classes.eventText}>
{calmeetin[this.props.month][this.props.day][i].coursetitle}
</Typography>
</ListItem>
Expand Down Expand Up @@ -103,7 +103,7 @@ class DayBoxSchedule extends Component {
calmeetin[this.props.month][this.props.day][i].color
}}
>
<Typography type="body2" className={classes.eventText}>
<Typography variant="body1" className={classes.eventText}>
{calmeetin[this.props.month][this.props.day][i].coursetitle}
</Typography>
</ListItem>
Expand Down
3 changes: 1 addition & 2 deletions src/components/DayList.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class DayList extends Component {
</div>
)
} catch (err) {
//console.log("Attempted render of undefined");
classList = (
<List style={{ padding: 0 }}>
<ListItem
Expand All @@ -42,7 +41,7 @@ class DayList extends Component {
color: '#004987'
}}
>
<ListItemText type="title" primary="You have no classes " />
<ListItemText primary="You have no classes " />
</ListItem>
</List>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/ErrorMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ErrorMessages extends Component {
<CardHeader title={header} />

<CardContent className={classes.content}>
<Typography type="body1">{subheader}</Typography>
<Typography variant="body1">{subheader}</Typography>
</CardContent>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/MobileMonthView.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class MobileMonthView extends Component {
for (let i = 0; i < 7; ++i) {
weekDaysRow.push(
<td key={i + Math.random()} style={{ width: '100rem' }}>
<Typography type="body1" component="div" style={{ fontWeight: 600 }}>
<Typography variant="body1" component="div" style={{ fontWeight: 600 }}>
{shortDayNames[i]}
</Typography>
</td>
Expand Down Expand Up @@ -263,7 +263,7 @@ class MobileMonthView extends Component {
className={classes.currentDay}
>
<Typography
type="body1"
variant="body1"
component="div"
className={classes.todayNumber}
>
Expand All @@ -281,7 +281,7 @@ class MobileMonthView extends Component {
className={classes.currentDay}
>
<Typography
type="body1"
variant="body1"
component="div"
className={classes.todayNumber}
>
Expand Down Expand Up @@ -336,7 +336,7 @@ class MobileMonthView extends Component {
className={classes.monthDay}
>
<Typography
type="body1"
variant="body1"
component="div"
className={classes.otherDayNumber}
>
Expand All @@ -354,7 +354,7 @@ class MobileMonthView extends Component {
className={classes.monthDay}
>
<Typography
type="body1"
variant="body1"
component="div"
className={classes.otherDayNumber}
>
Expand Down
11 changes: 4 additions & 7 deletions src/components/MobileView.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, { Component } from 'react'
import DayCard from './DayCard'
import Paper from '@material-ui/core/Paper'
import PropTypes from 'prop-types'
import Toolbar from '@material-ui/core/Toolbar'
import Typography from '@material-ui/core/Typography'
import { dayNames, shortDayNames } from './../utils/Strings'
import { getEvents } from './../api/api'
import { shortDayNames } from './../utils/Strings'
import { getWeeksOfMonth, getDaysInMonth } from './../utils/DateHelper'
import { withStyles } from '@material-ui/core/styles'

Expand Down Expand Up @@ -132,7 +129,7 @@ class MobileView extends Component {
}}
>
<Typography
type="body1"
variant="body1"
component="div"
style={{ fontWeight: '600' }}
>
Expand All @@ -149,7 +146,7 @@ class MobileView extends Component {
padding: '10px'
}}
>
<Typography type="body1" component="div">
<Typography variant="body1" component="div">
{this.monthDayCounter}
</Typography>
</td>
Expand All @@ -167,7 +164,7 @@ class MobileView extends Component {
for (let i = 0; i < 7; ++i) {
weekDaysRow.push(
<td key={weekDaysRow[i]} style={{ width: '100rem' }}>
<Typography type="body1" component="div" style={{ fontWeight: 600 }}>
<Typography variant="body1" component="div" style={{ fontWeight: 600 }}>
{shortDayNames[i]}
</Typography>
</td>
Expand Down
6 changes: 3 additions & 3 deletions src/components/MonthView.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class MonthView extends Component {
}
}}
>
<Typography type="body1" component="div" style={fontStyle}>
<Typography variant="body1" component="div" style={fontStyle}>
{this.monthDayCounter}
<div aria-hidden="true" id={this.monthDayCounter + 'class'}>
<DayBoxSchedule
Expand All @@ -214,7 +214,7 @@ class MonthView extends Component {
weekDaysRow.push(
<th scope="col" key={dayNames[i]} style={{ width: '100rem' }}>
<Typography
type="body1"
variant="body1"
component="div"
style={{ fontWeight: 600 }}
aria-label={dayNames[i]}
Expand Down Expand Up @@ -244,7 +244,7 @@ class MonthView extends Component {
<Toolbar className={classes.dayTitleBar}>
<Typography
tabIndex="0"
type="title"
variant="h6"
style={{ fontWeight: 'bold', opacity: 0.9 }}
>
{this.displayWeekDay()}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ScheduleEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ class ScheduleEvent extends Component {
}}
tabIndex="0"
>
<Typography type="title" className={classes.courseTitle}>
<Typography variant="h6" className={classes.courseTitle}>
{this.props.events[month][day][i].coursename}
</Typography>
<Typography type="body1" className={classes.eventBody}>
<Typography variant="body1" className={classes.eventBody}>
{this.props.events[month][day][i].coursetitle}
</Typography>
<Typography type="body1" className={classes.eventBody}>
<Typography variant="body1" className={classes.eventBody}>
{displayTime}
</Typography>
</Paper>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ScheduleView.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ class ScheduleView extends Component {
aria-label={week[i].day + ' ' + week[i].dayNameFull}
>
<Typography
type="display2"
variant="h3"
className={classes.dayTextNumber}
aria-hidden="true"
>
{week[i].day}
</Typography>
<Typography
type="display1"
variant="h4"
className={classes.dayTextDay}
aria-hidden="true"
>
Expand Down Expand Up @@ -109,14 +109,14 @@ class ScheduleView extends Component {
}
>
<Typography
type="display2"
variant="h3"
className={classes.dayTextNumber}
aria-hidden="true"
>
{week[i].day}
</Typography>
<Typography
type="display1"
variant="h4"
className={classes.dayTextDay}
aria-hidden="true"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Titlebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class Titlebar extends Component {

return (
<Typography
variant="title"
variant="h6"
className={classes.dateRange}
style={{ width: 140 }}
aria-label={ariaLabel}
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import 'typeface-arimo'

const oaklandTheme = createMuiTheme({
palette: {
typography: {
useNextVariants: true
},
primary: {
light: '#b89f74',
main: '#877148',
Expand Down

0 comments on commit b24b26b

Please sign in to comment.