import PromptEntry from './PromptEntry' import { PromptInput } from "../types"; interface PromptPanelProps { prompts: PromptInput[]; addPrompt: (prompt: string) => void; } const PromptPanel = (props: PromptPanelProps) => { const prompts = props.prompts; const addPrompt = props.addPrompt; return ( <>
{prompts.map((prompt, index) => ( ))}
{ e.preventDefault(); const prompt = e.currentTarget.prompt.value; addPrompt(prompt); }}>
) } export default PromptPanel // WIP manner of passing ideal font of each promptEntry based on where it is in the promptPanel. Could be done better with a map or something. // need not just order, but some context of where we are in time, and when that prompt will be primary (some global step state) const promptEntryClassNames = { 0: "pb-32 text-lg text-gray-400", 1: "pb-32 text-xl text-gray-300", 2: "pb-32 text-3xl text-white", 3: "pb-32 text-m text-gray-400", }