-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
empoty states, search functionality, updated glossary cards
- Loading branch information
1 parent
74bea63
commit 7a066ec
Showing
12 changed files
with
387 additions
and
437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { FileJson } from "lucide-react"; | ||
import { categories } from "./data"; | ||
// note this is a separate client-file to include the icons, so that we can load the typescript .ts file into our content-collection config | ||
export const categoriesWithIcons = [...categories.map((c) => ({ ...c, icon: <FileJson /> }))] as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { z } from "zod"; | ||
|
||
// note that this doesn't include the react icons, so that we can load the typescript .ts file into our content-collection config | ||
export const categories = [ | ||
{ | ||
slug: "api-specification", | ||
title: "API Specification", | ||
description: | ||
"API & Web standards for defining data formats and interactions (e.g. OpenAPI, REST, HTTP Requests, etc.)", | ||
}, | ||
] as const; | ||
|
||
|
||
// Extract slug values to create a union type | ||
type CategorySlug = typeof categories[number]['slug']; | ||
|
||
// Create a Zod enum from the CategorySlug type | ||
export const categoryEnum = z.enum(categories.map(c => c.slug) as [CategorySlug, ...Array<CategorySlug>]); | ||
|
||
export type CategoryEnum = z.infer<typeof categoryEnum>; | ||
|
Oops, something went wrong.