modules page: improves design cohesiveness of module components
This commit is contained in:
committed by
Johannes Kirschbauer
parent
26303eadaa
commit
fd65b9c3c0
@@ -19,9 +19,9 @@ interface CategoryProps {
|
|||||||
}
|
}
|
||||||
const Categories = (props: CategoryProps) => {
|
const Categories = (props: CategoryProps) => {
|
||||||
return (
|
return (
|
||||||
<span class="ml-6 inline-flex h-full align-middle">
|
<span class="inline-flex h-full align-middle">
|
||||||
{props.categories.map((category) => (
|
{props.categories.map((category) => (
|
||||||
<span class="">{category}</span>
|
<span class="text-sm font-normal">{category}</span>
|
||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@@ -32,10 +32,10 @@ interface RolesProps {
|
|||||||
}
|
}
|
||||||
const Roles = (props: RolesProps) => {
|
const Roles = (props: RolesProps) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<span>
|
<span>
|
||||||
<Typography hierarchy="body" size="xs">
|
<Typography hierarchy="body" size="xs">
|
||||||
Service Typography{" "}
|
Service
|
||||||
</Typography>
|
</Typography>
|
||||||
</span>
|
</span>
|
||||||
{props.roles.map((role) => (
|
{props.roles.map((role) => (
|
||||||
@@ -54,9 +54,14 @@ const ModuleItem = (props: {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={cx("rounded-lg shadow-md", props.class)}>
|
<div
|
||||||
<div class="text-primary-800">
|
class={cx(
|
||||||
<div class="">
|
"col-span-1 flex flex-col gap-3 border-b border-secondary-200 pb-4",
|
||||||
|
props.class,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{/* <div class="stat-figure text-primary-800">
|
||||||
|
<div class="join">
|
||||||
<Menu popoverid={`menu-${props.name}`} label={<Icon icon={"More"} />}>
|
<Menu popoverid={`menu-${props.name}`} label={<Icon icon={"More"} />}>
|
||||||
<ul class="z-[1] w-52 p-2 shadow">
|
<ul class="z-[1] w-52 p-2 shadow">
|
||||||
<li>
|
<li>
|
||||||
@@ -71,20 +76,26 @@ const ModuleItem = (props: {
|
|||||||
</ul>
|
</ul>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<A href={`/modules/details/${name}`}>
|
<header class="flex flex-col gap-4">
|
||||||
<div class="underline">
|
<A href={`/modules/details/${name}`}>
|
||||||
{name}
|
<div class="stat-value">
|
||||||
<Categories categories={info.categories} />
|
<div class="flex flex-col">
|
||||||
|
<Categories categories={info.categories} />
|
||||||
|
<Typography hierarchy="title" size="m" weight="medium">
|
||||||
|
{name}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</A>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<Typography hierarchy="body" size="xs">
|
||||||
|
{info.description}
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</A>
|
</header>
|
||||||
|
|
||||||
<div class="w-full">
|
|
||||||
<Typography hierarchy="body" size="default">
|
|
||||||
{info.description}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
<Roles roles={info.roles || []} />
|
<Roles roles={info.roles || []} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -151,10 +162,10 @@ export const ModuleList = () => {
|
|||||||
<Match when={modulesQuery.isFetching}>Loading....</Match>
|
<Match when={modulesQuery.isFetching}>Loading....</Match>
|
||||||
<Match when={modulesQuery.data}>
|
<Match when={modulesQuery.data}>
|
||||||
<div
|
<div
|
||||||
class="my-4 flex flex-wrap gap-6 px-3 py-2"
|
class="p-6 grid gap-6"
|
||||||
classList={{
|
classList={{
|
||||||
"flex-col": view() === "list",
|
"grid-cols-1": view() === "list",
|
||||||
"": view() === "grid",
|
"grid-cols-2": view() === "grid",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<For each={modulesQuery.data}>
|
<For each={modulesQuery.data}>
|
||||||
|
|||||||
Reference in New Issue
Block a user