Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: correct iconsOnly bookmark group spacing #4502

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/bookmarks/group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export default function BookmarksGroup({
<div
key={bookmarks.name}
className={classNames(
"bookmark-group",
"bookmark-group flex-1 overflow-hidden",
layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/4 lg:basis-1/5 xl:basis-1/6",
layout?.header === false ? "flex-1 px-1 -my-1 overflow-hidden" : "flex-1 p-1 overflow-hidden",
layout?.header === false ? "px-1" : "p-1 pb-0",
)}
>
<Disclosure defaultOpen={!(layout?.initiallyCollapsed ?? groupsInitiallyCollapsed) ?? true}>
Expand Down
7 changes: 3 additions & 4 deletions src/components/bookmarks/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { columnMap } from "../../utils/layout/columns";
import Item from "components/bookmarks/item";

export default function List({ bookmarks, layout, bookmarksStyle }) {
let classes =
layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col mt-3 bookmark-list";
let classes = layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col bookmark-list";
const style = {};
if (layout?.iconsOnly || bookmarksStyle === "icons") {
classes = "grid gap-3 mt-3 bookmark-list";
classes = "grid gap-2 bookmark-list";
style.gridTemplateColumns = "repeat(auto-fill, minmax(60px, 1fr))";
}
return (
<ul className={classNames(classes)} style={style}>
<ul className={classNames(classes, "mb-2", layout?.header === false ? "" : "mt-3")} style={style}>
{bookmarks.map((bookmark) => (
<Item
key={`${bookmark.name}-${bookmark.href}`}
Expand Down