Skip to content

Commit

Permalink
Reverted back changes related to colorManipulator import.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Jan 8, 2020
1 parent ff1f2d3 commit 54ce5b2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { Fragment, useState } from 'react';
import PropTypes from 'prop-types';
import ActionDelete from '@material-ui/icons/Delete';
import colorManipulator, { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import inflection from 'inflection';
import {
useTranslate,
Expand Down Expand Up @@ -31,10 +32,7 @@ const useStyles = makeStyles(
deleteButton: {
color: theme.palette.error.main,
'&:hover': {
backgroundColor: colorManipulator.fade(
theme.palette.error.main,
0.12
),
backgroundColor: fade(theme.palette.error.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import ActionDelete from '@material-ui/icons/Delete';
import colorManipulator, { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import {
useDeleteMany,
useRefresh,
Expand Down Expand Up @@ -30,10 +31,7 @@ const useStyles = makeStyles(
deleteButton: {
color: theme.palette.error.main,
'&:hover': {
backgroundColor: colorManipulator.fade(
theme.palette.error.main,
0.12
),
backgroundColor: fade(theme.palette.error.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import React, {
SyntheticEvent,
} from 'react';
import PropTypes from 'prop-types';
import colorManipulator, { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import ActionDelete from '@material-ui/icons/Delete';
import classnames from 'classnames';
import inflection from 'inflection';
Expand Down Expand Up @@ -144,10 +145,7 @@ const useStyles = makeStyles(
deleteButton: {
color: theme.palette.error.main,
'&:hover': {
backgroundColor: colorManipulator.fade(
theme.palette.error.main,
0.12
),
backgroundColor: fade(theme.palette.error.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down
8 changes: 3 additions & 5 deletions packages/ra-ui-materialui/src/button/DeleteWithUndoButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback, FC, ReactElement, SyntheticEvent } from 'react';
import PropTypes from 'prop-types';
import colorManipulator, { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import ActionDelete from '@material-ui/icons/Delete';
import classnames from 'classnames';
import {
Expand Down Expand Up @@ -107,10 +108,7 @@ const useStyles = makeStyles(
deleteButton: {
color: theme.palette.error.main,
'&:hover': {
backgroundColor: colorManipulator.fade(
theme.palette.error.main,
0.12
),
backgroundColor: fade(theme.palette.error.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down
7 changes: 2 additions & 5 deletions packages/ra-ui-materialui/src/layout/Confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
import colorManipulator from '@material-ui/core/styles';
import { fade } from '@material-ui/core/styles/colorManipulator';
import ActionCheck from '@material-ui/icons/CheckCircle';
import AlertError from '@material-ui/icons/ErrorOutline';
import classnames from 'classnames';
Expand All @@ -24,10 +24,7 @@ const useStyles = makeStyles(
confirmWarning: {
color: theme.palette.error.main,
'&:hover': {
backgroundColor: colorManipulator.fade(
theme.palette.error.main,
0.12
),
backgroundColor: fade(theme.palette.error.main, 0.12),
// Reset on mouse devices
'@media (hover: none)': {
backgroundColor: 'transparent',
Expand Down
8 changes: 3 additions & 5 deletions packages/ra-ui-materialui/src/list/BulkActionsToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import colorManipulator, { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import { lighten } from '@material-ui/core/styles/colorManipulator';
import { useTranslate, sanitizeListRestProps } from 'ra-core';

import TopToolbar from '../layout/TopToolbar';
Expand All @@ -19,10 +20,7 @@ const useStyles = makeStyles(
justifyContent: 'space-between',
backgroundColor:
theme.palette.type === 'light'
? colorManipulator.lighten(
theme.palette.primary.light,
0.85
)
? lighten(theme.palette.primary.light, 0.85)
: theme.palette.primary.dark,
minHeight: theme.spacing(8),
height: theme.spacing(8),
Expand Down

0 comments on commit 54ce5b2

Please sign in to comment.