Skip to content

Commit

Permalink
refactor(tag-input): extract subcomponents for improved modularity
Browse files Browse the repository at this point in the history
  • Loading branch information
JaleelB committed Dec 26, 2023
1 parent cc7fbda commit 1f9168a
Show file tree
Hide file tree
Showing 7 changed files with 1,232 additions and 1,661 deletions.
3 changes: 2 additions & 1 deletion components/sections/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Tag, TagInput } from "@/components/tag-input";
import { Tag, TagInput } from "@/components/tag/tag-input";
import Link from "next/link";
import { Button, buttonVariants } from "@/components/ui/button";
import { z } from "zod";
Expand Down Expand Up @@ -97,6 +97,7 @@ export default function Hero() {
placeholder="Enter a topic"
tags={tags}
className="sm:min-w-[450px]"
usePopoverForTags
setTags={(newTags) => {
setTags(newTags);
setValue("topics", newTags as [Tag, ...Tag[]]);
Expand Down
2 changes: 1 addition & 1 deletion components/sections/props.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Tag, TagInput } from "../tag-input";
import { Tag, TagInput } from "../tag/tag-input";
import { Label } from "../ui/label";
import {
Table,
Expand Down
895 changes: 478 additions & 417 deletions components/sections/variants.tsx

Large diffs are not rendered by default.

Loading

0 comments on commit 1f9168a

Please sign in to comment.