Skip to content

Commit

Permalink
fix: Use @material-ui/core styles - fixes styling issues e.g. report …
Browse files Browse the repository at this point in the history
…printing
  • Loading branch information
gmaclennan committed Oct 7, 2019
1 parent 08e86c4 commit 1957010
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 31 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"@material-ui/core": "^4.4.2",
"@material-ui/icons": "^4.4.1",
"@material-ui/pickers": "^3.2.6",
"@material-ui/styles": "^4.4.1",
"@segment/isodate": "^1.0.3",
"clone-deep": "^4.0.1",
"clsx": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/MapView/MapViewContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import mapboxgl from 'mapbox-gl'
import type { Observation } from 'mapeo-schema'

import { getLastImage } from '../utils/helpers'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import ObservationLayer from './ObservationLayer'
import Popup from './Popup'
import type { CameraOptions, CommonViewContentProps } from '../types'
Expand Down
2 changes: 1 addition & 1 deletion src/MapView/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Typography from '@material-ui/core/Typography'
import clsx from 'clsx'

import Image from '../internal/Image'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'

const useStyles = makeStyles({
wrapper: {
Expand Down
2 changes: 1 addition & 1 deletion src/MediaView/ImageGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'
import { FixedSizeGrid as Grid } from 'react-window'
import getScrollBarWidth from 'get-scrollbar-width'

import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import type { Observation } from 'mapeo-schema'

const useStyles = makeStyles({
Expand Down
2 changes: 1 addition & 1 deletion src/ObservationDialog/MediaCarousel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import React, { useState } from 'react'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import IconButton from '@material-ui/core/IconButton'
import NavigateNextIcon from '@material-ui/icons/NavigateNext'
import NavigateBeforeIcon from '@material-ui/icons/NavigateBefore'
Expand Down
2 changes: 1 addition & 1 deletion src/ObservationDialog/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Paper from '@material-ui/core/Paper'
import MenuItem from '@material-ui/core/MenuItem'
import matchSorter from 'match-sorter'
import { useIntl, defineMessages } from 'react-intl'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'

import type { SelectableFieldValue, SelectOptions } from '../types'

Expand Down
2 changes: 1 addition & 1 deletion src/ReportView/DetailsTable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import Typography from '@material-ui/core/Typography'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
import TableCell from '@material-ui/core/TableCell'
Expand Down
2 changes: 1 addition & 1 deletion src/ReportView/HideFieldsButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ListItemText from '@material-ui/core/ListItemText'
import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'
import Switch from '@material-ui/core/Switch'
import Button from '@material-ui/core/Button'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import { defineMessages, FormattedMessage } from 'react-intl'

import ToolbarButton from '../internal/ToolbarButton'
Expand Down
2 changes: 1 addition & 1 deletion src/ReportView/ReportPageContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import React from 'react'
import { makeStyles } from '@material-ui/styles'
import { makeStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import FeatureHeader from '../internal/FeatureHeader'
import Image from '../internal/Image'
Expand Down
2 changes: 1 addition & 1 deletion src/ReportView/ReportPaper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import Paper from '@material-ui/core/Paper'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import insertCss from 'insert-css'
import clsx from 'clsx'

Expand Down
2 changes: 1 addition & 1 deletion src/ReportView/ReportViewContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import React, { useState, useMemo } from 'react'
import { makeStyles } from '@material-ui/styles'
import { makeStyles } from '@material-ui/core/styles'
import getScrollBarWidth from 'get-scrollbar-width'
import {
AutoSizer,
Expand Down
2 changes: 1 addition & 1 deletion src/internal/FeatureHeader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import CardHeader from '@material-ui/core/CardHeader'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import { FormattedTime, FormattedMessage } from 'react-intl'

import PlaceIcon from '@material-ui/icons/Place'
Expand Down
2 changes: 1 addition & 1 deletion src/internal/FormattedValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react'
import { FormattedDate, FormattedTime } from 'react-intl'

import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import { coerceValue } from '../lib/data_analysis/value_types'
import * as fieldTypes from '../constants/field_types'
import * as valueTypes from '../constants/value_types'
Expand Down
2 changes: 1 addition & 1 deletion src/internal/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react'
import Img from 'react-image'
import CircularProgress from '@material-ui/core/CircularProgress'
import BrokenImageIcon from '@material-ui/icons/BrokenImage'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
// import * as CSS from 'csstype'

const useStyles = makeStyles({
Expand Down
2 changes: 1 addition & 1 deletion src/internal/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from 'react'
import AppBar from '@material-ui/core/AppBar'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'

const useStyles = makeStyles({
root: {
Expand Down
2 changes: 1 addition & 1 deletion src/internal/ToolbarButton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import * as React from 'react'
import { makeStyles } from '../utils/styles'
import { makeStyles } from '@material-ui/core/styles'
import Button from '@material-ui/core/Button'

const useStyles = makeStyles({
Expand Down
15 changes: 0 additions & 15 deletions src/utils/styles.js

This file was deleted.

0 comments on commit 1957010

Please sign in to comment.