Skip to content

Commit

Permalink
Federation dark theme improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rkfg committed Jul 18, 2024
1 parent fc1a02b commit 299f284
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/resources/destinations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,30 @@ import {
useNotify,
useRefresh,
useTranslate,
useTheme,
DateFieldProps,
} from "react-admin";

import { DATE_FORMAT } from "../components/date";

Check failure on line 34 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

There should be at least one empty line between import groups
import { blue } from '@mui/material/colors';

Check failure on line 35 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

There should be at least one empty line between import groups

Check failure on line 35 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

`@mui/material/colors` import should occur before import of `react-admin`

Check failure on line 35 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Replace `'@mui/material/colors'` with `"@mui/material/colors"`
import { get } from 'lodash';

Check failure on line 36 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

`lodash` import should occur before import of `react`

Check failure on line 36 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Replace `'lodash'` with `"lodash"`

const DestinationPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />;

const destinationRowSx = (record: RaRecord) => ({
const destinationRowSxLight = (record: RaRecord) => ({
backgroundColor: record.retry_last_ts > 0 ? "#ffcccc" : "white",
});

const destinationRowSxDark = (record: RaRecord) => ({
backgroundColor: record.retry_last_ts > 0 ? "#ffcccc" : "black",
'& > td': {

Check failure on line 46 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Replace `'&·>·td'` with `"&·>·td"`
color: record.retry_last_ts > 0 ? "black" : "white",
'& > button': {

Check failure on line 48 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Replace `'&·>·button'` with `"&·>·button"`
color: blue[600]

Check failure on line 49 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Insert `,`
}

Check failure on line 50 in src/resources/destinations.tsx

View workflow job for this annotation

GitHub Actions / check

Insert `,`
}
});

const destinationFilters = [<SearchInput source="destination" alwaysOn />];

export const DestinationReconnectButton = () => {
Expand Down Expand Up @@ -102,6 +115,8 @@ const RetryDateField = (props: DateFieldProps) => {
}

export const DestinationList = (props: ListProps) => {
const [theme] = useTheme();
const destinationRowSx = theme === 'light' ? destinationRowSxLight : destinationRowSxDark;
return (
<List
{...props}
Expand Down

0 comments on commit 299f284

Please sign in to comment.