mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
1 line
4.6 KiB
JavaScript
1 line
4.6 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[957],{3905:function(t,e,n){n.d(e,{Zo:function(){return u},kt:function(){return y}});var r=n(7294);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var c=r.createContext({}),s=function(t){var e=r.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):a(a({},e),t)),n},u=function(t){var e=s(t.components);return r.createElement(c.Provider,{value:e},t.children)},p={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},f=r.forwardRef((function(t,e){var n=t.components,o=t.mdxType,i=t.originalType,c=t.parentName,u=l(t,["components","mdxType","originalType","parentName"]),f=s(n),y=o,m=f["".concat(c,".").concat(y)]||f[y]||p[y]||i;return n?r.createElement(m,a(a({ref:e},u),{},{components:n})):r.createElement(m,a({ref:e},u))}));function y(t,e){var n=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var i=n.length,a=new Array(i);a[0]=f;var l={};for(var c in e)hasOwnProperty.call(e,c)&&(l[c]=e[c]);l.originalType=t,l.mdxType="string"==typeof t?t:o,a[1]=l;for(var s=2;s<i;s++)a[s]=n[s];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},7432:function(t,e,n){n.r(e),n.d(e,{frontMatter:function(){return l},contentTitle:function(){return c},metadata:function(){return s},assets:function(){return u},toc:function(){return p},default:function(){return y}});var r=n(7462),o=n(3366),i=(n(7294),n(3905)),a=["components"],l={},c=void 0,s={unversionedId:"ox_inventory/Functions/External/Client/Utils/notify",id:"ox_inventory/Functions/External/Client/Utils/notify",title:"notify",description:"Displays the notification used accross the inventory.",source:"@site/docs/ox_inventory/Functions/External/Client/Utils/notify.md",sourceDirName:"ox_inventory/Functions/External/Client/Utils",slug:"/ox_inventory/Functions/External/Client/Utils/notify",permalink:"/docs/ox_inventory/Functions/External/Client/Utils/notify",editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/Functions/External/Client/Utils/notify.md",tags:[],version:"current",frontMatter:{},sidebar:"docs",previous:{title:"Items",permalink:"/docs/ox_inventory/Functions/External/Client/Items/"},next:{title:"weaponWheel",permalink:"/docs/ox_inventory/Functions/External/Client/Utils/weaponWheel"}},u={},p=[],f={toc:p};function y(t){var e=t.components,n=(0,o.Z)(t,a);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Displays the notification used accross the inventory."),(0,i.kt)("p",null,"The notifications are built using the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/timolins/react-hot-toast"},"react-hot-teast")," library."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-lua"},"-- data: table\nexports.ox_inventory:notify(data)\n")),(0,i.kt)("p",null,"Values for the ",(0,i.kt)("inlineCode",{parentName:"p"},"data")," table:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-lua"},"-- text: string\n-- type: string (optional)\n -- 'success'\n -- 'info' - default\n -- 'error'\n-- position: string (optional)\n -- 'top-left'\n -- 'top-center' - default\n -- 'top-right'\n -- 'bottom-left'\n -- 'bottom-center'\n -- 'bottom-right\n-- duration: number (optional - default is 4000 ms)\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Example:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-lua"},"exports.ox_inventory:notify({type = 'Success', text = 'Making pancakes', duration = 2500})\n")))}y.isMDXComponent=!0}}]); |