From 2ae80b9ae2e9eeb4cb323eeca71dbba258294c63 Mon Sep 17 00:00:00 2001 From: ismay Date: Tue, 14 Nov 2023 11:11:14 +0100 Subject: [PATCH] refactor: adjust expandable row styles --- src/components/JobTable/ExpandableRow.js | 19 +++++-------------- .../JobTable/ExpandableRow.module.css | 11 +++-------- src/components/JobTable/QueueTableRow.js | 9 ++------- 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/src/components/JobTable/ExpandableRow.js b/src/components/JobTable/ExpandableRow.js index ba12e5c3d..11cda1ac4 100644 --- a/src/components/JobTable/ExpandableRow.js +++ b/src/components/JobTable/ExpandableRow.js @@ -1,22 +1,15 @@ import React from 'react' import { TableRow, TableCell } from '@dhis2/ui' import PropTypes from 'prop-types' -import cx from 'classnames' import { jobTypesMap } from '../../services/server-translations' import styles from './ExpandableRow.module.css' -const ExpandableRow = ({ job, isFirst, isLast }) => { +const ExpandableRow = ({ job }) => { return ( - - - {job.name} - + + + {job.name} + {jobTypesMap[job.type]} @@ -26,8 +19,6 @@ const ExpandableRow = ({ job, isFirst, isLast }) => { const { shape, string } = PropTypes ExpandableRow.propTypes = { - isFirst: string.isRequired, - isLast: string.isRequired, job: shape({ name: string.isRequired, type: string.isRequired, diff --git a/src/components/JobTable/ExpandableRow.module.css b/src/components/JobTable/ExpandableRow.module.css index b61efb7c6..c85466be4 100644 --- a/src/components/JobTable/ExpandableRow.module.css +++ b/src/components/JobTable/ExpandableRow.module.css @@ -1,13 +1,8 @@ .row { - background: var(--colors-grey300); + box-shadow: inset 8px 0 0 0 var(--colors-grey500); } -.first { - box-shadow: inset 0 5px 4px -4px var(--colors-grey600); -} - -.last .cell { - /* Using important here to override the specificity of styled-jsx's inline styles */ +.indent { /* stylelint-disable-next-line declaration-no-important */ - border-bottom: 1px solid var(--colors-grey300) !important; + padding-left: 32px !important; } diff --git a/src/components/JobTable/QueueTableRow.js b/src/components/JobTable/QueueTableRow.js index 8cee28f2b..db1d79146 100644 --- a/src/components/JobTable/QueueTableRow.js +++ b/src/components/JobTable/QueueTableRow.js @@ -70,13 +70,8 @@ const QueueTableRow = ({ {showJobs - ? sequence.map((job, index) => ( - + ? sequence.map((job) => ( + )) : null}