@@ -4,6 +4,20 @@ import { SettingContext } from '../../contexts/SettingContext';
44import { useRouter } from 'next/navigation' ;
55import { LiaPencilRulerSolid } from "react-icons/lia" ;
66import classNames from "classnames" ;
7+ import { GoArrowUpRight } from "react-icons/go" ;
8+
9+ const shortcutIdeas = [
10+ {
11+ id : 'Contactform' ,
12+ label : 'Contact form' ,
13+ value : 'A contact form with first name, last name, email, and message fields. Put the form in a card with a submit button.'
14+ } ,
15+ {
16+ id : 'Ecommercedashboard' ,
17+ label : 'Ecommerce dashboard' ,
18+ value : 'An ecommerce dashboard with a sidebar navigation and a table of recent orders.'
19+ }
20+ ]
721
822interface props {
923 openWhiteboard : ( ) => void
@@ -43,12 +57,12 @@ export default function ChatInput({openWhiteboard}: props) {
4357 < div className = 'w-full flex items-center justify-center p-6 gap-6' >
4458 < div
4559 onClick = { open }
46- className = 'before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-pink-500 relative inline-block px-2' >
60+ className = 'cursor-pointer before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-pink-500 relative inline-block px-2' >
4761 < span className = 'relative text-white' > screenshot</ span >
4862 </ div >
4963 < div
5064 onClick = { openWhiteboard }
51- className = 'before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-green-500 relative inline-block px-2' >
65+ className = 'cursor-pointer before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-green-500 relative inline-block px-2' >
5266 < span className = 'relative text-white' > whiteboard</ span >
5367 </ div >
5468 < div
@@ -59,7 +73,7 @@ export default function ChatInput({openWhiteboard}: props) {
5973 setShowAnim ( false ) ;
6074 } , 800 )
6175 } }
62- className = 'before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-cyan-500 relative inline-block px-8'
76+ className = 'cursor-pointer before:block before:absolute before:-inset-1 before:-skew-y-3 before:bg-cyan-500 relative inline-block px-8'
6377 >
6478 < span className = 'relative text-white' > ideas</ span >
6579 </ div >
@@ -127,6 +141,24 @@ export default function ChatInput({openWhiteboard}: props) {
127141 </ div >
128142 </ div >
129143 </ div >
144+ < div className = 'flex w-full mt-4 item-center justify-center gap-2' >
145+ {
146+ shortcutIdeas . map ( ( shortcut ) => {
147+ return (
148+ < button
149+ className = 'rounded-full border border-zinc-200 px-2 py-0.5 inline-flex gap-1 items-center whitespace-nowrap select-none hover:border-zinc-800 transition-colors'
150+ onClick = { ( ) => {
151+ setInitCreateText ( shortcut . value ) ;
152+ } }
153+ >
154+ { shortcut . label }
155+ < GoArrowUpRight />
156+ </ button > )
157+ } )
158+ }
159+
160+
161+ </ div >
130162 </ div >
131163 </ div >
132164 ) ;
0 commit comments