Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): scrollbars on item creator #96

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/ItemCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ItemCreator: React.FC<ItemCreatorProps> = ({onItemsCreate}) => {

return (
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)}>
<form onSubmit={form.handleSubmit(onSubmit)} className="flex flex-col overflow-y-hidden">
<FormField
control={form.control}
name="files"
Expand All @@ -100,7 +100,7 @@ const ItemCreator: React.FC<ItemCreatorProps> = ({onItemsCreate}) => {
</FormItem>
)}
/>
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 mt-4">
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 mt-4 overflow-y-auto pe-6">
{uploadedItems.map((item) => (
<div key={item.id} className="space-y-2">
<div className="w-28 h-28 relative">
Expand Down
2 changes: 1 addition & 1 deletion components/ItemManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const ItemManager: React.FC<ItemManagerProps> = ({
</DropdownMenu>

<Dialog open={isItemCreatorOpen} onOpenChange={setIsItemCreatorOpen}>
<DialogContent>
<DialogContent className="max-h-[80vh] overflow-hidden flex flex-col">
<DialogHeader>
<DialogTitle>Add New Items</DialogTitle>
<DialogDescription>
Expand Down