Skip to content

Commit

Permalink
refactor: better class names
Browse files Browse the repository at this point in the history
  • Loading branch information
logeekal committed Mar 11, 2024
1 parent 4c8fe91 commit 4a61483
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
font-family: $euiCodeFontFamily;
}

.dscDocsGrid__cell--expanded {
.unifiedDataTable__cell--expanded {
background-color: $euiColorHighlight;
}

.dscDocsGrid__cell--selected {
.unifiedDataTable__cell--selected {
background-color: $euiColorHighlight;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const SelectButton = ({ rowIndex, setCellProps }: EuiDataGridCellValueEle
useEffect(() => {
if (expanded && doc && expanded.id === doc.id) {
setCellProps({
className: 'dscDocsGrid__cell--selected',
className: 'unifiedDataTable__cell--selected',
});
} else {
setCellProps({ style: undefined });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const ExpandButton = ({ rowIndex, setCellProps }: EuiDataGridCellValueEle
useEffect(() => {
if (current.isAnchor) {
setCellProps({
className: 'dscDocsGrid__cell--highlight',
className: 'unifiedDataTable__cell--highlight',
});
} else if (expanded && current && expanded.id === current.id) {
setCellProps({
className: 'dscDocsGrid__cell--expanded',
className: 'unifiedDataTable__cell--expanded',
});
} else {
setCellProps({ style: undefined });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export const getRenderCellValueFn = ({
useEffect(() => {
if (row?.isAnchor) {
setCellProps({
className: 'dscDocsGrid__cell--highlight',
className: 'unifiedDataTable__cell--highlight',
});
} else if (ctx.expanded && row && ctx.expanded.id === row.id) {
setCellProps({
className: 'dscDocsGrid__cell--expanded',
className: 'unifiedDataTable__cell--expanded',
});
} else {
setCellProps({ style: undefined });
Expand Down

0 comments on commit 4a61483

Please sign in to comment.