Skip to content

Commit

Permalink
Fix remaining color props in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Jan 9, 2025
1 parent 33818f1 commit 92e0bc7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
5 changes: 4 additions & 1 deletion examples/demo/src/layout/SubMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const SubMenu = (props: Props) => {
<ListItemIcon sx={{ minWidth: 5 }}>
{isOpen ? <ExpandMore /> : icon}
</ListItemIcon>
<Typography variant="inherit" color="textSecondary">
<Typography
variant="inherit"
sx={{ color: theme => theme.palette.text.secondary }}
>
{translate(name)}
</Typography>
</MenuItem>
Expand Down
28 changes: 23 additions & 5 deletions examples/demo/src/visitors/Aside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ const Order = () => {
if (!record) return null;
return (
<>
<Typography variant="body2" color="textSecondary" gutterBottom>
<Typography
variant="body2"
sx={{ color: theme => theme.palette.text.secondary }}
gutterBottom
>
{new Date(record.date).toLocaleString(locale, {
year: 'numeric',
month: 'short',
Expand All @@ -267,11 +271,18 @@ const Order = () => {
minute: 'numeric',
})}
</Typography>
<Typography variant="body2" color="textSecondary" gutterBottom>
<Typography
variant="body2"
sx={{ color: theme => theme.palette.text.secondary }}
gutterBottom
>
Reference &nbsp;#{record.reference}&nbsp;-&nbsp;
<TextField source="status" />
</Typography>
<Typography variant="body2" color="textSecondary">
<Typography
variant="body2"
sx={{ color: theme => theme.palette.text.secondary }}
>
<NumberField
source="total"
options={{ style: 'currency', currency: 'USD' }}
Expand Down Expand Up @@ -304,7 +315,11 @@ const Review = () => {
if (!record) return null;
return (
<>
<Typography variant="body2" color="textSecondary" gutterBottom>
<Typography
variant="body2"
sx={{ color: theme => theme.palette.text.secondary }}
gutterBottom
>
{new Date(record.date).toLocaleString(locale, {
year: 'numeric',
month: 'short',
Expand All @@ -326,7 +341,10 @@ const Review = () => {
>
{record.comment}
</Typography>
<Typography variant="body2" color="textSecondary">
<Typography
variant="body2"
sx={{ color: theme => theme.palette.text.secondary }}
>
<StarRatingField source="rating" />
</Typography>
</>
Expand Down

0 comments on commit 92e0bc7

Please sign in to comment.