mirror of
https://github.com/zadam/trilium.git
synced 2026-02-22 05:34:27 +01:00
client/list view: refactor
This commit is contained in:
parent
483c57029a
commit
d1a3bceaa6
@ -124,7 +124,6 @@
|
|||||||
|
|
||||||
/* List item */
|
/* List item */
|
||||||
.nested-note-list-item {
|
.nested-note-list-item {
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -225,8 +225,7 @@ export function NoteContent({ note, trim, noChildrenList, highlightedTokens, inc
|
|||||||
});
|
});
|
||||||
}, [ note, highlightedTokens ]);
|
}, [ note, highlightedTokens ]);
|
||||||
|
|
||||||
return <div ref={contentRef} className={clsx("note-book-content", `type-${noteType}`, {"note-book-content-ready": ready})}>
|
return <div ref={contentRef} className={clsx("note-book-content", `type-${noteType}`, {"note-book-content-ready": ready})} />;
|
||||||
</div>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function NoteChildren({ note, parentNote, highlightedTokens, currentLevel, expandDepth, includeArchived }: {
|
function NoteChildren({ note, parentNote, highlightedTokens, currentLevel, expandDepth, includeArchived }: {
|
||||||
|
|||||||
@ -19,7 +19,6 @@ interface CardSectionProps {
|
|||||||
subSections?: JSX.Element | JSX.Element[];
|
subSections?: JSX.Element | JSX.Element[];
|
||||||
subSectionsVisible?: boolean;
|
subSectionsVisible?: boolean;
|
||||||
highlightOnHover?: boolean;
|
highlightOnHover?: boolean;
|
||||||
hasAction?: boolean;
|
|
||||||
onAction?: () => void;
|
onAction?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ export function CardSection(props: {children: ComponentChildren} & CardSectionPr
|
|||||||
return <>
|
return <>
|
||||||
<section className={clsx("tn-card-section", props.className, {
|
<section className={clsx("tn-card-section", props.className, {
|
||||||
"tn-card-section-nested": nestingLevel > 0,
|
"tn-card-section-nested": nestingLevel > 0,
|
||||||
"tn-card-section-highlight-on-hover": props.highlightOnHover || props.hasAction
|
"tn-card-section-highlight-on-hover": props.highlightOnHover || props.onAction
|
||||||
})}
|
})}
|
||||||
style={{"--tn-card-section-nesting-level": nestingLevel}}
|
style={{"--tn-card-section-nesting-level": nestingLevel}}
|
||||||
onClick={props.onAction}>
|
onClick={props.onAction}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user