Skip to content

Commit

Permalink
used local css modules instead of global
Browse files Browse the repository at this point in the history
  • Loading branch information
asimregmi committed Oct 4, 2023
1 parent 8a35df5 commit ad8f992
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import PropTypes from 'prop-types';
import { Link, useLocation } from 'react-router-dom';
import * as ROUTES from '../../../constants/routes';
import { getOutputPath } from 'utils/jobsUtil';
import './HighlightSearchTerm.scss';
import styles from './HighlightSearchTerm.module.scss';

const HighlightSearchTerm = ({ searchTerm, cell, id }) => {
const highlightParts = (content) => {
const parts = content.split(new RegExp(`(${searchTerm})`, 'gi'));
return parts.map((part, i) =>
part.toLowerCase() === searchTerm.toLowerCase() ? (
<b className="highlight" key={i}>
<b className={styles['highlight']} key={i}>
{part}
</b>
) : (
Expand All @@ -31,7 +31,7 @@ const HighlightSearchTerm = ({ searchTerm, cell, id }) => {
</Link>
) : null;
} else if (id == 'uuid') {
return <b className="highlight">{cell.render('Cell')}</b>;
return <b className={styles['highlight']}>{cell.render('Cell')}</b>;
} else if (id == 'name') {
const jobName = cell.row.values[id];

Expand Down

0 comments on commit ad8f992

Please sign in to comment.