You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`suggestions` - a list of queries that can be chosen from a list
12
+
-`setShouldDisplayEzql` is a setter for toggling whether the modal is displayed; provide a setter that when true will remove the modal from your page
13
+
-`didSubmitWithValue` is called when a query has been submitted to the modal _before_ a request has been made to Outerbase
14
+
-`onResults` is called with the resulting SQL string or JSON data (depending on the Prompt type specified)
15
+
-`className` provides optional styling classes to be added to the modal
10
16
11
17
```tsx
12
18
importEzqlPromptfrom'react-ezql'
13
19
14
20
<EzqlPrompt
21
+
token={'arbitrary-value-asdf-1234'}
15
22
setShouldDisplayEzql={setShouldDisplayEzql}
16
23
suggestions={['How many books sold last week', 'How many new users signed up today']}
17
24
didSubmitWithValue={(value) => {
@@ -93,3 +100,17 @@ Each HTML Element has been an assigned a meaningful classname that you can style
93
100
color: white;
94
101
}
95
102
```
103
+
104
+
## Local development of react-ezql
105
+
pnpm is recommended as `npm link` does not work properly (as of 03/09/2023) with regards to `npm link`ing `lib/ezql` to `react-ezql`. Instead, do this from the `react-ezql` directory:
106
+
107
+
```sh
108
+
pnpm install
109
+
pnpm link ../../
110
+
```
111
+
112
+
And be sure to have also built your latest changes in `lib/ezql`, i.e.:
0 commit comments