Skip to content

Commit 0f96eb2

Browse files
committed
feat: trash icon
1 parent 4ac8996 commit 0f96eb2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/components/Themes/ThemePreview.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Dispatch, SetStateAction, useState } from "react";
22

33
import ChatBot, { Params } from "react-chatbotify";
44
import { formatPreviewIdToTitleCase } from "../../utils";
5+
import { Trash } from "lucide-react";
56

67
type ThemePreviewProps = {
78
previewIds: string[];
@@ -68,7 +69,7 @@ const ThemePreview = ({ previewIds, setPreviewIds }: ThemePreviewProps) => {
6869
className={`h-[92vh] bg-accent-800 p-5 flex flex-col items-center
6970
w-screen md:w-[45rem] absolute md:relative`}
7071
>
71-
<div className="text-accent-50 mb-4 md:mb-12 w-full md:mt-14">
72+
<div className="text-accent-50 mb-4 md:mb-6 w-full md:mt-14">
7273
<h2 className="text-2xl font-semibold">Preview</h2>
7374
<h3 className="text-accent-400">{previewIds.length} theme(s) selected</h3>
7475
</div>
@@ -96,20 +97,23 @@ const ThemePreview = ({ previewIds, setPreviewIds }: ThemePreviewProps) => {
9697
flow={flow}
9798
themes={previewIds.map((themeId) => ({ id: themeId }))}
9899
settings={{ general: { embedded: true } }}
99-
styles={{ chatWindowStyle: { height: "50vh" } }}
100+
styles={{ chatWindowStyle: { height: "45vh" } }}
100101
/>
101102
<div className="w-full mt-8 max-h-[300px] overflow-y-auto">
102103
{previewIds.map((previewId) => {
103104
const previewTitle = formatPreviewIdToTitleCase(previewId);
104105
return (
105106
<div className="flex justify-between my-2">
106107
<span className="text-accent-50 font-semibold text-lg">{previewTitle}</span>
107-
<button
108-
onClick={() => handleRemoveSelectionClick(previewId)}
109-
className="text-blue-500 hover:text-blue-600 font-semibold"
110-
>
111-
Remove Selection (x)
112-
</button>
108+
<div className="text-blue-500 hover:text-blue-600 flex items-center">
109+
<button
110+
onClick={() => handleRemoveSelectionClick(previewId)}
111+
className="font-semibold mr-[3px]"
112+
>
113+
Remove Selection
114+
</button>
115+
<Trash size={15}/>
116+
</div>
113117
</div>
114118
);
115119
})}

0 commit comments

Comments
 (0)