Skip to content

Commit

Permalink
Merge pull request #177 from RrybaN/notify-show-progress
Browse files Browse the repository at this point in the history
feat(ox_lib/notify): add showDuration and changed images on documentation
  • Loading branch information
thelindat authored Apr 22, 2024
2 parents fd7ed95 + 76c1cd6 commit 88126a1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pages/ox_lib/Modules/Interface/Client/notify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Custom notifications with a lot of styling options.
- Must provide if there is no title
- Markdown support
- duration?: `number`
- Default: `3000`
- showDuration?: `boolean`
- Default: `true`
- position?: `'top'` or `'top-right'` or `'top-left'` or `'bottom'` or `'bottom-right'` or `'bottom-left'` or `'center-right'` or `'center-left'`
- Default: `'top-right'`
- type?: `'inform'` or `'error'` or `'success'`or `'warning'`
Expand All @@ -52,18 +55,19 @@ Custom notifications with a lot of styling options.
- icon?: `string`
- Font Awesome 6 icon name
- iconColor?: `string`
- CSS Legal Color Values
- iconAnimation?: `'spin'` `'spinPulse'` `'spinReverse'` `'pulse'` `'beat'` `'fade'` `'beatFade'` `'bounce'` `'shake'`
- alignIcon?: `'top'` or `'center'`
- Default: `'center'`
- sound?: `table` (`object`)
- bank?: `string`
- name of soundbank that contains the soundset provided
- set: `string`
- Soundset the soundname is a member of.
- Soundset the soundname is a member of.
- name: `string`
<Callout>
Setting `iconColor` will get rid of the contrasted icon colour and it's circular background.
</Callout>
</Callout

## Usage Example

Expand Down Expand Up @@ -92,7 +96,7 @@ Custom notifications with a lot of styling options.
</Tab>
</Tabs>

![notification](https://i.imgur.com/HFeBTLg.png)
![notification](https://i.imgur.com/UOISjlm.png)

### Custom

Expand All @@ -103,6 +107,7 @@ Custom notifications with a lot of styling options.
id = 'some_identifier',
title = 'Notification title',
description = 'Notification description',
showDuration = false,
position = 'top',
style = {
backgroundColor = '#141517',
Expand All @@ -124,6 +129,7 @@ Custom notifications with a lot of styling options.
id: 'some_identifier',
title: 'Notification title',
description: 'Notification description',
showDuration: false,
position: 'top',
style: {
backgroundColor: '#141517',
Expand All @@ -139,4 +145,4 @@ Custom notifications with a lot of styling options.
</Tab>
</Tabs>

![custom_notification](https://i.imgur.com/WpqiW5f.png)
![custom_notification](https://i.imgur.com/1qwsJsH.png)

0 comments on commit 88126a1

Please sign in to comment.