Browse Source

feat(ui): add close-small icon and use it for comment card dismiss button

David Hill 1 month ago
parent
commit
d3490cfd29

+ 5 - 2
packages/app/src/components/prompt-input.tsx

@@ -1693,7 +1693,10 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
                   >
                     <div class="flex items-center gap-1.5">
                       <FileIcon node={{ path: item.path, type: "file" }} class="shrink-0 size-3.5" />
-                      <div class="flex items-center text-11-regular min-w-0">
+                      <div
+                        class="flex items-center text-11-regular min-w-0"
+                        style={{ "font-weight": "var(--font-weight-medium)" }}
+                      >
                         <span class="text-text-weak whitespace-nowrap truncate min-w-0">{getDirectory(item.path)}</span>
                         <span class="text-text-strong whitespace-nowrap">{getFilename(item.path)}</span>
                         <Show when={item.selection}>
@@ -1708,7 +1711,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
                       </div>
                       <IconButton
                         type="button"
-                        icon="close"
+                        icon="close-small"
                         variant="ghost"
                         class="h-5 w-5 opacity-0 group-hover:opacity-100"
                         onClick={(e) => {

+ 1 - 0
packages/ui/src/components/icon.tsx

@@ -15,6 +15,7 @@ const icons = {
   "chevron-double-right": `<path d="M11.6654 13.3346L14.9987 10.0013L11.6654 6.66797M5.83203 13.3346L9.16536 10.0013L5.83203 6.66797" stroke="currentColor" stroke-linecap="square"/>`,
   "circle-x": `<path fill-rule="evenodd" clip-rule="evenodd" d="M1.6665 10.0003C1.6665 5.39795 5.39746 1.66699 9.99984 1.66699C14.6022 1.66699 18.3332 5.39795 18.3332 10.0003C18.3332 14.6027 14.6022 18.3337 9.99984 18.3337C5.39746 18.3337 1.6665 14.6027 1.6665 10.0003ZM7.49984 6.91107L6.91058 7.50033L9.41058 10.0003L6.91058 12.5003L7.49984 13.0896L9.99984 10.5896L12.4998 13.0896L13.0891 12.5003L10.5891 10.0003L13.0891 7.50033L12.4998 6.91107L9.99984 9.41107L7.49984 6.91107Z" fill="currentColor"/>`,
   close: `<path d="M3.75 3.75L16.25 16.25M16.25 3.75L3.75 16.25" stroke="currentColor" stroke-linecap="square"/>`,
+  "close-small": `<path d="M6 6L14 14M14 6L6 14" stroke="currentColor" stroke-linecap="square"/>`,
   checklist: `<path d="M9.58342 13.7498H17.0834M9.58342 6.24984H17.0834M2.91675 6.6665L4.58341 7.9165L7.08341 4.1665M2.91675 14.1665L4.58341 15.4165L7.08341 11.6665" stroke="currentColor" stroke-linecap="square"/>`,
   console: `<path d="M3.75 5.4165L8.33333 9.99984L3.75 14.5832M10.4167 14.5832H16.25" stroke="currentColor" stroke-linecap="square"/>`,
   expand: `<path d="M4.58301 10.4163V15.4163H9.58301M10.4163 4.58301H15.4163V9.58301" stroke="currentColor" stroke-linecap="square"/>`,