Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Created March 24, 2025 23:24
Show Gist options
  • Save codigoconjuan/9ebd4f5f36ccb4d8a8445fb9dab7063e to your computer and use it in GitHub Desktop.
Save codigoconjuan/9ebd4f5f36ccb4d8a8445fb9dab7063e to your computer and use it in GitHub Desktop.
Generar Recetas con IA en React y TypeScript
export default function GenerateAI() {
return (
<>
<h1 className="text-6xl font-extrabold">Generar Receta con IA</h1>
<div className="max-w-4xl mx-auto">
<form
onSubmit={() => {}}
className='flex flex-col space-y-3 py-10'
>
<div className="relative">
<input
name="prompt"
id="prompt"
className="border bg-white p-4 rounded-lg w-full border-slate-800"
placeholder="Genera una receta con ingredientes. Ej. Bebida con Tequila y Fresa"
/>
<button
type="submit"
aria-label="Enviar"
className={`cursor-pointer absolute top-1/2 right-5 transform -translate-x-1/2 -translate-y-1/2`}
>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5"
stroke="currentColor" className="w-10 h-10">
<path strokeLinecap="round" strokeLinejoin="round"
d="m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
</svg>
</button>
</div>
</form>
<div className="py-10 whitespace-pre-wrap">
</div>
</div>
</>
)
}
@DarkTortilla
Copy link

Mil Gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment