CoolFace
Apppublic

legends810/testingnew

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
ExamplePrompts.tsx37 linesDownload Raw Back to chat
1import React from 'react';2 3const EXAMPLE_PROMPTS = [4  { text: 'Build a todo app in React using Tailwind' },5  { text: 'Build a simple blog using Astro' },6  { text: 'Create a cookie consent form using Material UI' },7  { text: 'Make a space invaders game' },8  { text: 'Make a Tic Tac Toe game in html, css and js only' },9];10 11export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInput?: string): void | undefined }) {12  return (13    <div id="examples" className="relative flex flex-col gap-9 w-full max-w-3xl mx-auto flex justify-center mt-6">14      <div15        className="flex flex-wrap justify-center gap-2"16        style={{17          animation: '.25s ease-out 0s 1 _fade-and-move-in_g2ptj_1 forwards',18        }}19      >20        {EXAMPLE_PROMPTS.map((examplePrompt, index: number) => {21          return (22            <button23              key={index}24              onClick={(event) => {25                sendMessage?.(event, examplePrompt.text);26              }}27              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"28            >29              {examplePrompt.text}30            </button>31          );32        })}33      </div>34    </div>35  );36}37