ui/list view: use card frame component instead of a custom styled element

This commit is contained in:
Adorian Doran 2026-02-22 19:43:25 +02:00
parent e6e132e905
commit 47aa24d0f4
2 changed files with 5 additions and 8 deletions

View File

@ -246,17 +246,14 @@
/* #region Grid view */
.note-book-card {
.note-list .note-book-card {
--note-list-horizontal-padding: 22px;
--note-list-vertical-padding: 15px;
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 1;
border: 1px solid var(--card-border-color) !important;
border-radius: 12px;
background-color: var(--card-background-color, var(--accented-background-color));
padding: 0;
overflow: hidden;
user-select: none;

View File

@ -1,5 +1,5 @@
import "./ListOrGridView.css";
import { Card, CardSection } from "../../react/Card";
import { Card, CardFrame, CardSection } from "../../react/Card";
import { useCallback, useEffect, useRef, useState } from "preact/hooks";
@ -160,7 +160,7 @@ function GridNoteCard(props: GridNoteCardProps) {
const notePath = getNotePath(props.parentNote, props.note);
return (
<div className={clsx("note-book-card", "no-tooltip-preview", "block-link", {
<CardFrame className={clsx("note-book-card", "no-tooltip-preview", "block-link", {
"archived": props.note.isArchived
})}
data-href={`#${notePath}`}
@ -182,7 +182,7 @@ function GridNoteCard(props: GridNoteCardProps) {
highlightedTokens={props.highlightedTokens}
includeArchivedNotes={props.includeArchived}
/>
</div>
</CardFrame>
);
}