Skip to content

Commit ab32e4d

Browse files
committed
Adds tab styles to fill in row dividers top and bottom
1 parent 2219abc commit ab32e4d

File tree

1 file changed

+4
-0
lines changed
  • apps/webapp/app/components/primitives

1 file changed

+4
-0
lines changed

apps/webapp/app/components/primitives/Table.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ const rowHoverStyles = {
168168
const stickyStyles =
169169
"sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]/table-row:bg-background-bright";
170170

171+
const tabFocusRowDividerStyles =
172+
"has-[[tabindex='0']:focus]:after:absolute has-[[tabindex='0']:focus]:after:bottom-0 has-[[tabindex='0']:focus]:after:left-0 has-[[tabindex='0']:focus]:after:right-0 has-[[tabindex='0']:focus]:after:h-px has-[[tabindex='0']:focus]:after:bg-grid-dimmed has-[[tabindex='0']:focus]:before:absolute has-[[tabindex='0']:focus]:before:left-0 has-[[tabindex='0']:focus]:before:-top-px has-[[tabindex='0']:focus]:before:h-px has-[[tabindex='0']:focus]:before:w-3 has-[[tabindex='0']:focus]:before:bg-grid-dimmed";
173+
171174
const isSelectedStyle = "bg-charcoal-750 group-hover:bg-charcoal-750";
172175

173176
export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
@@ -217,6 +220,7 @@ export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
217220
isSticky && stickyStyles,
218221
isSelected && isSelectedStyle,
219222
!isSelected && rowHoverStyles[rowHoverStyle],
223+
tabFocusRowDividerStyles,
220224
className
221225
)}
222226
colSpan={colSpan}

0 commit comments

Comments
 (0)