feat(ui): use NavSection in ListClansModal

This commit is contained in:
Brian McGee
2025-08-22 12:11:22 +01:00
parent 8a59cf7ea3
commit 878789cf38
2 changed files with 5 additions and 23 deletions

View File

@@ -12,13 +12,4 @@
.clans { .clans {
@apply flex flex-col gap-2; @apply flex flex-col gap-2;
} }
.clan {
@apply flex items-center justify-between;
@apply px-4 py-5 bg-def-2;
.meta {
@apply flex flex-col gap-1;
}
}
} }

View File

@@ -9,6 +9,7 @@ import { For, Show } from "solid-js";
import { activeClanURI, clanURIs, setActiveClanURI } from "@/src/stores/clan"; import { activeClanURI, clanURIs, setActiveClanURI } from "@/src/stores/clan";
import { useClanListQuery } from "@/src/hooks/queries"; import { useClanListQuery } from "@/src/hooks/queries";
import { Alert } from "@/src/components/Alert/Alert"; import { Alert } from "@/src/components/Alert/Alert";
import { NavSection } from "../NavSection/NavSection";
export interface ListClansModalProps { export interface ListClansModalProps {
onClose?: () => void; onClose?: () => void;
@@ -78,20 +79,10 @@ export const ListClansModal = (props: ListClansModalProps) => {
<ul class={cx(styles.clans)}> <ul class={cx(styles.clans)}>
<For each={clanList()}> <For each={clanList()}>
{(clan) => ( {(clan) => (
<li class={cx(styles.clan)}> <li>
<div class={cx(styles.meta)}> <NavSection
<Typography hierarchy="label" weight="bold" size="default"> label={clan.data.name}
{clan.data.name} description={clan.data.description ?? undefined}
</Typography>
<Typography hierarchy="body" size="s">
{clan.data.description}
</Typography>
</div>
<Button
hierarchy="secondary"
ghost
icon="CaretRight"
onClick={selectClan(clan.data.uri)} onClick={selectClan(clan.data.uri)}
/> />
</li> </li>