This repository was archived by the owner on Jan 21, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ const TRIGGERS = ['KeyK', 'Slash']
66
77function App ( ) {
88 const [ shouldDisplayEzql , setShouldDisplayEzql ] = useState ( false )
9+ const [ token , setToken ] = useState < string > ( '' )
10+
911 const suggestions = [ 'How many books sold last week' , 'How many new users signed up today' ]
1012
1113 // listen for the trigger to display the modal
@@ -27,12 +29,21 @@ function App() {
2729
2830 return (
2931 < >
30- < p >
32+ < p className = "text-center text-gray-400 my-2" >
3133 Press < i > Command-K</ i > to display EZQL, < i > Escape</ i > to dismiss.
3234 </ p >
3335
36+ < p className = 'mx-2 flex items-center' >
37+ < label > Token</ label >
38+ < input
39+ className = "bg-gray-50 rounded-sm ml-4 border border-gray-200 p-1 flex-1"
40+ onChange = { ( event ) => setToken ( event . target . value ) }
41+ />
42+ </ p >
43+
3444 { shouldDisplayEzql && (
3545 < EzqlPrompt
46+ token = { token }
3647 setShouldDisplayEzql = { setShouldDisplayEzql }
3748 suggestions = { suggestions }
3849 didSubmitWithValue = { ( value ) => {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { classNames } from '../lib/class-names'
66import styles from './ezql-prompt.module.css'
77
88export type EzqlPromptOpts = {
9+ token : string
910 setShouldDisplayEzql : ( value : boolean ) => void
1011 onResults : ( data : object ) => void
1112 didSubmitWithValue ?: ( query : string ) => void
@@ -14,6 +15,7 @@ export type EzqlPromptOpts = {
1415}
1516
1617export default function EzqlPrompt ( {
18+ token,
1719 setShouldDisplayEzql,
1820 didSubmitWithValue,
1921 onResults,
You can’t perform that action at this time.
0 commit comments