Skip to content

Commit

Permalink
refactor: use css module instead of inline styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Nov 14, 2023
1 parent 2ae80b9 commit 335bf19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/JobTable/QueueTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Status from './Status'
import NextRun from './NextRun'
import Schedule from './Schedule'
import ExpandableRow from './ExpandableRow'
import styles from './QueueTableRow.module.css'

const QueueTableRow = ({
queue: {
Expand All @@ -29,17 +30,12 @@ const QueueTableRow = ({
}) => {
const [showJobs, setShowJobs] = useState(false)
const handleClick = () => setShowJobs((prev) => !prev)
const buttonStyle = {
background: 'none',
border: 'none',
cursor: 'pointer',
}

return (
<>
<TableRow>
<TableCell>
<button style={buttonStyle} onClick={handleClick}>
<button className={styles.button} onClick={handleClick}>
{showJobs ? <IconChevronUp24 /> : <IconChevronDown24 />}
</button>
</TableCell>
Expand Down
5 changes: 5 additions & 0 deletions src/components/JobTable/QueueTableRow.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.button {
background: none;
border: none;
cursor: pointer;
}

0 comments on commit 335bf19

Please sign in to comment.