Skip to content

Commit

Permalink
resolve layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-sg committed Feb 6, 2025
1 parent 40c74eb commit 3131678
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions frontend/src/components/ui/tab-group/tab-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export class TabGroup extends TailwindElement {
@property({ type: String, reflect: false })
active = "";

@property({ type: String })
overrideTabLayout?: string;

/* Nav placement */
@property({ type: String })
placement: "top" | "start" = "top";
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/features/collections/collection-edit-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
} from "@/types/collection";
import { maxLengthValidator, type MaxLengthValidator } from "@/utils/form";
import { formatRwpTimestamp } from "@/utils/replay";
import { tw } from "@/utils/tailwind";

type Tab = "general" | "sharing";

Expand Down Expand Up @@ -231,11 +230,12 @@ export class CollectionEdit extends BtrixElement {
>
<btrix-tab-group
placement="top"
overrideTabLayout=${tw`mb-4 flex gap-2`}
.sticky=${false}
active=${this.tab}
@btrix-tab-change=${(e: CustomEvent<Tab>) => {
this.tab = e.detail;
}}
class="part-[content]:pt-4"
>
${this.renderTab({
panel: "general",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/layouts/pageSectionsWithNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ export function pageSectionsWithNav({
sticky && tw`lg:sticky lg:top-2 lg:self-start`,
placement === "start" ? tw`lg:max-w-[16.5rem]` : tw`lg:flex-row`,
)}
part="tabs"
>
${nav}
</div>
<div class="flex-1">${main}</div>
<div class="flex-1" part="content">${main}</div>
</div>
`;
}

0 comments on commit 3131678

Please sign in to comment.