Set inbox selection to fixed light gray
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
50577b8c63
commit
57357991e4
2 changed files with 3 additions and 2 deletions
|
|
@ -136,7 +136,7 @@ describe("SwipeToArchive", () => {
|
|||
|
||||
const surface = container.querySelector("[data-inbox-row-surface]") as HTMLDivElement | null;
|
||||
expect(surface).not.toBeNull();
|
||||
expect(surface?.style.backgroundColor).toBe("hsl(var(--muted))");
|
||||
expect(surface?.style.backgroundColor).toBe("rgb(243, 244, 246)");
|
||||
expect(surface?.style.boxShadow).toBe("");
|
||||
|
||||
act(() => {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ interface SwipeToArchiveProps {
|
|||
const COMMIT_THRESHOLD = 0.32;
|
||||
const MAX_SWIPE = 0.88;
|
||||
const COMMIT_DELAY_MS = 140;
|
||||
const SELECTED_ROW_BACKGROUND = "#f3f4f6";
|
||||
|
||||
export function SwipeToArchive({
|
||||
children,
|
||||
|
|
@ -155,7 +156,7 @@ export function SwipeToArchive({
|
|||
style={{
|
||||
transform: `translate3d(${offsetX}px, 0, 0)`,
|
||||
transition: isDragging ? "none" : "transform 180ms ease-out",
|
||||
backgroundColor: selected ? "hsl(var(--muted))" : undefined,
|
||||
backgroundColor: selected ? SELECTED_ROW_BACKGROUND : undefined,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue