mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
fix documentation errors
This commit is contained in:
1 parent
c42193a9e2
commit
3d75766552
3 files changed
+35
-7
No files matched your search
@@ -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>
|
||||
|
||||
|
||||
|
||||

|
||||
@@ -34,7 +34,7 @@ lib.notify(data)
|
||||
* duration?: `number`
|
||||
* position?: `'top'` or `'top-right'` or `'top-left'` or `'bottom'` or `'bottom-right'` or `'bottom-left'`
|
||||
* Default: `'top-right'`
|
||||
* type: `'inform'` or `'error'` or `'success'`
|
||||
* type?: `'inform'` or `'error'` or `'success'`
|
||||
* Default: `'inform'`
|
||||
* style?: `table` (`object`)
|
||||
* React CSS styling format
|
||||
|
||||
@@ -121,10 +121,11 @@ if (await lib.progressBar({
|
||||
},
|
||||
prop: {
|
||||
model: `prop_ld_flow_bottle`,
|
||||
pos: vec3(0.03, 0.03, 0.02),
|
||||
rot: vec3(0.0, 0.0, -1.5)
|
||||
pos: {x: 0.03, y: 0.03, z: 0.02},
|
||||
rot: {x: 0.0, y: 0.0, z: -1.5}
|
||||
},
|
||||
})) print('Do stuff when complete') else print('Do stuff when cancelled')
|
||||
})) console.log('Do stuff when complete');
|
||||
else console.log('Do stuff when cancelled')
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@@ -249,10 +250,11 @@ if (await lib.progressCircle({
|
||||
},
|
||||
prop: {
|
||||
model: `prop_ld_flow_bottle`,
|
||||
pos: vec3(0.03, 0.03, 0.02),
|
||||
rot: vec3(0.0, 0.0, -1.5)
|
||||
pos: {x: 0.03, y: 0.03, z: 0.02},
|
||||
rot: {x: 0.0, y: 0.0, z: -1.5}
|
||||
},
|
||||
})) print('Do stuff when complete') else print('Do stuff when cancelled')
|
||||
})) console.log('Do stuff when complete')
|
||||
else console.log('Do stuff when cancelled')
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Reference in new issue
Block a user