Skip to content

Commit

Permalink
ui(web): Set tag input field in preview modal to 100% width to fix ov…
Browse files Browse the repository at this point in the history
…erflow issues on select dropdown (#165)

ui(web): Fixed issue with rounded corners on tag input field in preview modal

ui(web): Adjusted styles for labels and fields in preview modal for visual consistency
  • Loading branch information
lilacpixel authored May 19, 2024
1 parent fdc27d3 commit cb62db7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 22 additions & 2 deletions apps/web/components/dashboard/bookmarks/TagsEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,32 @@ export function TagsEditor({ bookmark }: { bookmark: ZBookmark }) {
overflowY: "auto",
scrollbarWidth: "none",
}),
container: (styles) => ({
...styles,
width: "100%",
}),
control: (styles) => ({
...styles,
overflow: "hidden",
backgroundColor: "hsl(var(--background))",
borderColor: "hsl(var(--border))",
":hover": {
borderColor: "hsl(var(--border))",
},
}),
input: (styles) => ({
...styles,
color: "rgb(156 163 175)",
}),
menu: (styles) => ({
...styles,
overflow: "hidden",
color: "rgb(156 163 175)",
}),
placeholder: (styles) => ({
...styles,
color: "hsl(var(--muted-foreground))",
}),
}}
components={{
MultiValueContainer: ({ children, data }) => (
Expand Down Expand Up @@ -155,9 +173,11 @@ export function TagsEditor({ bookmark }: { bookmark: ZBookmark }) {
}}
classNames={{
multiValueRemove: () => "my-auto",
valueContainer: () => "gap-2 bg-background",
menuList: () => "text-sm bg-background",
valueContainer: () => "gap-2 bg-background text-sm",
menu: () => "dark:text-gray-300",
menuList: () => "bg-background text-sm",
option: () => "text-red-500",
input: () => "dark:text-gray-300",
}}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/dashboard/preview/BookmarkPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ export default function BookmarkPreview({
</div>

<CreationTime createdAt={bookmark.createdAt} />
<div className="flex gap-4">
<div className="flex items-center gap-4">
<p className="text-sm text-gray-400">Tags</p>
<TagsEditor bookmark={bookmark} />
</div>
<div className="flex gap-4">
<p className="text-sm text-gray-400">Note</p>
<p className="pt-2 text-sm text-gray-400">Note</p>
<NoteEditor bookmark={bookmark} />
</div>
<ActionBar bookmark={bookmark} />
Expand Down

0 comments on commit cb62db7

Please sign in to comment.