Skip to content

Commit

Permalink
Merge pull request #4469 from WiXSL/fix-link-class-simple-list
Browse files Browse the repository at this point in the history
Fix <SimpleListLoading> `link` style is not implemented error.
  • Loading branch information
fzaninotto authored Mar 4, 2020
2 parents 2ba8f60 + ad1b336 commit 59ad085
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/ra-ui-materialui/src/list/SimpleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ import { linkToRecord, sanitizeListRestProps } from 'ra-core';
import SimpleListLoading from './SimpleListLoading';

const useStyles = makeStyles(
{
tertiary: { float: 'right', opacity: 0.541176 },
},
{ name: 'RaSimpleList' }
);

const useLinkOrNotStyles = makeStyles(
{
link: {
textDecoration: 'none',
color: 'inherit',
},
tertiary: { float: 'right', opacity: 0.541176 },
},
{ name: 'RaSimpleList' }
{ name: 'RaLinkOrNot' }
);

const LinkOrNot = ({
Expand All @@ -30,7 +36,7 @@ const LinkOrNot = ({
id,
children,
}) => {
const classes = useStyles({ classes: classesOverride });
const classes = useLinkOrNotStyles({ classes: classesOverride });
return linkType === 'edit' || linkType === true ? (
<Link to={linkToRecord(basePath, id)} className={classes.link}>
{children}
Expand Down

0 comments on commit 59ad085

Please sign in to comment.