diff --git a/components/PromptPanel.tsx b/components/PromptPanel.tsx index 026adaf..c985c7b 100644 --- a/components/PromptPanel.tsx +++ b/components/PromptPanel.tsx @@ -1,6 +1,7 @@ import PromptEntry from './PromptEntry' import { PromptInput } from "../types"; +import {useRef} from 'react'; interface PromptPanelProps { prompts: PromptInput[]; @@ -12,13 +13,15 @@ export default function PromptPanel({ addPrompt, }: PromptPanelProps) { + const inputPrompt = useRef(null); + return ( <> -
-
-
- {prompts.map((prompt, index) => ( - +
+
+
+ {prompts.slice(-6).map((prompt, index) => ( + ))}
@@ -26,13 +29,15 @@ export default function PromptPanel({ e.preventDefault(); const prompt = e.currentTarget.prompt.value; addPrompt(prompt); + inputPrompt.current.value = ''; }}> @@ -43,13 +48,13 @@ export default function 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. +// option to use flexbox, but maybe want just static positioning instead
// 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-12 text-lg text-gray-400", - 1: "pb-1/6 text-xl text-gray-300", - 2: "pb-1/6 text-3xl text-white", - 3: "pb-1/6 text-m text-gray-400", - 4: "pb-1/6 text-m text-gray-300", - 5: "pb-1/6 text-m text-gray-400", - 6: "pb-1/6 text-m text-gray-300", + 0: "font-light text-sm text-gray-400 text-opacity-40", + 1: "font-normal text-m text-gray-300 text-opacity-60", + 2: "font-medium text-xl text-gray-200 text-opacity-80", + 3: "font-bold text-5xl text-white", // This is the primary prompt + 4: "font-medium text-2xl text-gray-200 text-opacity-80", + 5: "font-normal text-m text-gray-300 text-opacity-60", } diff --git a/pages/index.tsx b/pages/index.tsx index 51751bd..5ec0465 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -13,6 +13,10 @@ import * as Tone from "tone"; const defaultPromptInputs = [ { prompt: "A jazz pianist playing a classical concerto"}, { prompt: "Taylor Swift singing with a tropical beat"}, + { prompt: "A typewriter in the bahamas"}, + { prompt: "Justin Bieber anger rap"}, + { prompt: "New york city rap, with a dust storm, cinematic score, dramatic, composition"}, + { prompt: "Jack Johnson playing a harmonica in the 1920s"}, ]; const defaultInferenceResults = [