fix documentation errors

This commit is contained in:
Luke committed 2022-09-17 14:32:19 +02:00
1 parent c42193a9e2
commit 3d75766552
3 files changed
+35 -7

No files matched your search

+26
View File
@@ -17,6 +17,10 @@ lib.alertDialog(data)
</TabItem>
<TabItem value='JS/TS'>
:::caution
This function is **asynchronous** requiring you to do a `.then` callback on the promise or make your function `async`.
:::
```ts
import lib from '@overextended/ox_lib/client'
@@ -40,6 +44,9 @@ or has exited the dialog with ESC the return will be `cancel`.
**Example:**
<Tabs>
<TabItem value='Lua'>
```lua
local alert = lib.alertDialog({
header = 'Hello there',
@@ -50,5 +57,24 @@ local alert = lib.alertDialog({
print(alert)
```
</TabItem>
<TabItem value='JS/TS'>
```ts
import lib from '@overextended/ox_lib/client'
const alert = await lib.alertDialog({
header: 'Hello there',
content: 'General Kenobi \n Markdown support!',
centered: true,
cancel: true
})
console.log(alert)
```
</TabItem>
</Tabs>
![alert_dialog](https://i.imgur.com/TnUT3S1.png)