Skip to content

Commit

Permalink
Use same label style for schemas list
Browse files Browse the repository at this point in the history
  • Loading branch information
albingroen committed Feb 21, 2023
1 parent 917bb07 commit 2e3cbd6
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions components/Schemas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import CommandPalette, { filterItems, getItemIndex } from "react-cmdk";
import Link from "next/link";
import Sidebar from "./Sidebar";
import SidebarItem from "./SidebarItem";
import Stack from "./Stack";
import toast from "react-hot-toast";
import { CircleStackIcon } from "@heroicons/react/24/outline";
import { LINKS } from "./Links";
Expand All @@ -11,7 +12,6 @@ import { Schema } from "../lib/types";
import { useEffect, useState } from "react";
import { useRouter } from "next/dist/client/router";
import { useSchemaContext } from "../lib/context";
import Stack from "./Stack";

export default function Schemas() {
const { schemas, setSchemas } = useSchemaContext();
Expand Down Expand Up @@ -120,33 +120,34 @@ export default function Schemas() {
</CommandPalette>

<Sidebar>
<div className="p-5">
<p className="text-gray-600 font-medium text-sm">Schemas</p>
<Stack direction="vertical" className="p-5">
<p className="label-flat">Schemas</p>

<ul className="mt-2.5 w-full">
{schemas.map((schema) => (
<li key={schema.name}>
<SidebarItem
href={`/schemas/${schema.name}`}
icon={CircleStackIcon}
>
{schema.name}
</SidebarItem>
</li>
))}
</ul>
<Stack direction="vertical" spacing="large">
<ul className="w-full">
{schemas.map((schema) => (
<li key={schema.name}>
<SidebarItem
href={`/schemas/${schema.name}`}
icon={CircleStackIcon}
>
{schema.name}
</SidebarItem>
</li>
))}
</ul>

<Button
className="mt-3.5"
icon={PlusIcon}
type="button"
onClick={() => {
handleCreateSchema();
}}
>
New schema
</Button>
</div>
<Button
icon={PlusIcon}
type="button"
onClick={() => {
handleCreateSchema();
}}
>
New schema
</Button>
</Stack>
</Stack>
</Sidebar>

<Stack className="flex-1" justify="center" align="center">
Expand Down

1 comment on commit 2e3cbd6

@vercel
Copy link

@vercel vercel bot commented on 2e3cbd6 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.