Commit
·
a71b45d
1
Parent(s):
f20173f
added example buttons
Browse files
app/components/chat/ExamplePrompts.tsx
CHANGED
@@ -10,8 +10,16 @@ const EXAMPLE_PROMPTS = [
|
|
10 |
|
11 |
export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInput?: string): void | undefined }) {
|
12 |
return (
|
13 |
-
<div
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
{EXAMPLE_PROMPTS.map((examplePrompt, index: number) => {
|
16 |
return (
|
17 |
<button
|
@@ -19,10 +27,9 @@ export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInp
|
|
19 |
onClick={(event) => {
|
20 |
sendMessage?.(event, examplePrompt.text);
|
21 |
}}
|
22 |
-
|
23 |
>
|
24 |
{examplePrompt.text}
|
25 |
-
<div className="i-ph:arrow-bend-down-left" />
|
26 |
</button>
|
27 |
);
|
28 |
})}
|
|
|
10 |
|
11 |
export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInput?: string): void | undefined }) {
|
12 |
return (
|
13 |
+
<div
|
14 |
+
id="examples"
|
15 |
+
className="relative flex flex-col gap-9 w-full max-w-3xl mx-auto flex justify-center mt-6"
|
16 |
+
>
|
17 |
+
<div
|
18 |
+
className="flex flex-wrap justify-center gap-2"
|
19 |
+
style={{
|
20 |
+
animation: '.25s ease-out 0s 1 _fade-and-move-in_g2ptj_1 forwards',
|
21 |
+
}}
|
22 |
+
>
|
23 |
{EXAMPLE_PROMPTS.map((examplePrompt, index: number) => {
|
24 |
return (
|
25 |
<button
|
|
|
27 |
onClick={(event) => {
|
28 |
sendMessage?.(event, examplePrompt.text);
|
29 |
}}
|
30 |
+
className="border border-bolt-elements-borderColor rounded-full bg-gray-50 hover:bg-gray-100 dark:bg-gray-950 dark:hover:bg-gray-900 text-bolt-elements-textSecondary hover:text-bolt-elements-textPrimary px-3 py-1 text-xs transition-theme"
|
31 |
>
|
32 |
{examplePrompt.text}
|
|
|
33 |
</button>
|
34 |
);
|
35 |
})}
|