diff --git a/apps/client/src/widgets/layout/NoteTitleActions.css b/apps/client/src/widgets/layout/NoteTitleActions.css index 084901d54..80a7a98d1 100644 --- a/apps/client/src/widgets/layout/NoteTitleActions.css +++ b/apps/client/src/widgets/layout/NoteTitleActions.css @@ -4,6 +4,8 @@ body.experimental-feature-new-layout { } .title-actions { - padding: 0.75em 15px; + &.visible { + padding: 0.75em 15px; + } } } diff --git a/apps/client/src/widgets/layout/NoteTitleActions.tsx b/apps/client/src/widgets/layout/NoteTitleActions.tsx index 56bbb4b2b..31323ccbf 100644 --- a/apps/client/src/widgets/layout/NoteTitleActions.tsx +++ b/apps/client/src/widgets/layout/NoteTitleActions.tsx @@ -1,5 +1,7 @@ import "./NoteTitleActions.css"; +import clsx from "clsx"; + import FNote from "../../entities/fnote"; import { t } from "../../services/i18n"; import CollectionProperties from "../note_bars/CollectionProperties"; @@ -12,10 +14,14 @@ export default function NoteTitleActions() { const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_"); const noteType = useNoteProperty(note, "type"); + const items = [ + note && noteType === "search" && , + note && !isHiddenNote && noteType === "book" && + ].filter(Boolean); + return ( -
- {note && noteType === "search" && } - {note && !isHiddenNote && noteType === "book" && } +
0 && "visible")}> + {items}
); }