Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/tab_switcher): display margins only for text

Elian Doran13aebc060e4d
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
index 4769b833e0..0540f2b540 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
@@ -22,7 +22,10 @@
height: 180px;
overflow: hidden;
font-size: 0.5em;
- padding: 1em;
+
+ &.type-text {
+ padding: 10px;
+ }
p { margin-bottom: 0.2em;}
h2 { font-size: 1.20em; }
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
index 1f6cbed1a9..c32b742287 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
@@ -1,5 +1,6 @@
import "./TabSwitcher.css";
+import clsx from "clsx";
import { createPortal } from "preact/compat";
import { useEffect, useState } from "preact/hooks";
@@ -62,7 +63,7 @@ function Tab({ noteContext }: {
return (
<div class="tab-card">
<header>{noteContext.note?.title}</header>
- <div className="tab-preview">
+ <div className={clsx("tab-preview", `type-${note?.type ?? "empty"}`)}>
{note && <NoteContent
note={note}
highlightedTokens={undefined}