mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
1 line
9.3 KiB
JavaScript
1 line
9.3 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["d559fb74"],{"0aed1fc2":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("3ccd83ea");var o=i("a9d1a279");let{_InternalPanelDoNotUseOrYouWillBeFired:a}=o.notification;var s=()=>(0,n.jsx)(a,{message:"Hello World!",description:"Hello World?",type:"success",btn:(0,n.jsx)(o.Button,{type:"primary",size:"small",children:"My Button"})});},"0b831b5b":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return l;}});var n=i("852bbaa9"),o=i("f19d2b93");i("9c05edf1");var a=n._(i("5b220c3d")),s=i("e22febe0"),c=i("a9d1a279");let r=a.default.createContext({name:"Default"});var l=()=>{let[t,e]=c.notification.useNotification(),i=e=>{t.info({message:`Notification ${e}`,description:(0,o.jsx)(r.Consumer,{children:({name:t})=>`Hello, ${t}!`}),placement:e});},n=(0,a.useMemo)(()=>({name:"Ant Design"}),[]);return(0,o.jsxs)(r.Provider,{value:n,children:[e,(0,o.jsxs)(c.Space,{children:[(0,o.jsx)(c.Button,{type:"primary",onClick:()=>i("topLeft"),icon:(0,o.jsx)(s.RadiusUpleftOutlined,{}),children:"topLeft"}),(0,o.jsx)(c.Button,{type:"primary",onClick:()=>i("topRight"),icon:(0,o.jsx)(s.RadiusUprightOutlined,{}),children:"topRight"})]}),(0,o.jsx)(c.Divider,{}),(0,o.jsxs)(c.Space,{children:[(0,o.jsx)(c.Button,{type:"primary",onClick:()=>i("bottomLeft"),icon:(0,o.jsx)(s.RadiusBottomleftOutlined,{}),children:"bottomLeft"}),(0,o.jsx)(c.Button,{type:"primary",onClick:()=>i("bottomRight"),icon:(0,o.jsx)(s.RadiusBottomrightOutlined,{}),children:"bottomRight"})]})]});};},"1f0ed5a8":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return a;}});var n=i("f19d2b93");i("8c8af42c");var o=i("a9d1a279"),a=()=>{let[t,e]=o.notification.useNotification(),i=e=>{t[e]({message:"Notification Title",description:"This is the content of the notification. This is the content of the notification. This is the content of the notification."});};return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsxs)(o.Space,{children:[(0,n.jsx)(o.Button,{onClick:()=>i("success"),children:"Success"}),(0,n.jsx)(o.Button,{onClick:()=>i("info"),children:"Info"}),(0,n.jsx)(o.Button,{onClick:()=>i("warning"),children:"Warning"}),(0,n.jsx)(o.Button,{onClick:()=>i("error"),children:"Error"})]})]});};},"2d657de6":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("126c75a7");var o=i("e22febe0"),a=i("a9d1a279"),s=()=>{let[t,e]=a.notification.useNotification();return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)(a.Button,{type:"primary",onClick:()=>{t.open({message:"Notification Title",description:"This is the content of the notification. This is the content of the notification. This is the content of the notification.",icon:(0,n.jsx)(o.SmileOutlined,{style:{color:"#108ee9"}})});},children:"Open the notification box"})]});};},"3857ca13":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("c74bea28");var o=i("e22febe0"),a=i("a9d1a279"),s=()=>{let[t,e]=a.notification.useNotification(),i=e=>{t.info({message:`Notification ${e}`,description:"This is the content of the notification. This is the content of the notification. This is the content of the notification.",placement:e});};return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsxs)(a.Space,{children:[(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("top"),icon:(0,n.jsx)(o.BorderTopOutlined,{}),children:"top"}),(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("bottom"),icon:(0,n.jsx)(o.BorderBottomOutlined,{}),children:"bottom"})]}),(0,n.jsx)(a.Divider,{}),(0,n.jsxs)(a.Space,{children:[(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("topLeft"),icon:(0,n.jsx)(o.RadiusUpleftOutlined,{}),children:"topLeft"}),(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("topRight"),icon:(0,n.jsx)(o.RadiusUprightOutlined,{}),children:"topRight"})]}),(0,n.jsx)(a.Divider,{}),(0,n.jsxs)(a.Space,{children:[(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("bottomLeft"),icon:(0,n.jsx)(o.RadiusBottomleftOutlined,{}),children:"bottomLeft"}),(0,n.jsx)(a.Button,{type:"primary",onClick:()=>i("bottomRight"),icon:(0,n.jsx)(o.RadiusBottomrightOutlined,{}),children:"bottomRight"})]})]});};},"4cced71f":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return a;}});var n=i("f19d2b93");i("e17c722c");var o=i("a9d1a279"),a=()=>{let[t,e]=o.notification.useNotification(),i=e=>()=>{t.open({message:"Notification Title",description:"This is the content of the notification. This is the content of the notification. This is the content of the notification.",showProgress:!0,pauseOnHover:e});};return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsxs)(o.Space,{children:[(0,n.jsx)(o.Button,{type:"primary",onClick:i(!0),children:"Pause on hover"}),(0,n.jsx)(o.Button,{type:"primary",onClick:i(!1),children:"Don't pause on hover"})]})]});};},"4eb8ed34":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("fe4917e6");var o=i("a9d1a279");let a=()=>{o.notification.open({message:"Notification Title",description:"This is the content of the notification. This is the content of the notification. This is the content of the notification.",onClick:()=>{console.log("Notification Clicked!");}});};var s=()=>(0,n.jsx)(o.Button,{type:"primary",onClick:a,children:"Open the notification box"});},"66e4439b":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("91ff2504");var o=i("a9d1a279");let a="updatable";var s=()=>{let[t,e]=o.notification.useNotification();return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)(o.Button,{type:"primary",onClick:()=>{t.open({key:a,message:"Notification Title",description:"description."}),setTimeout(()=>{t.open({key:a,message:"New Title",description:"New description."});},1e3);},children:"Open the notification box"})]});};},"7967a7dc":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return r;}});var n=i("852bbaa9"),o=i("f19d2b93");i("32a97619");var a=n._(i("5b220c3d")),s=i("a9d1a279");let c=a.default.createContext({name:"Default"});var r=()=>{let[t,e]=a.default.useState(!0),[i,n]=a.default.useState(3),[r,l]=s.notification.useNotification({stack:!!t&&{threshold:i}}),d=(0,a.useMemo)(()=>({name:"Ant Design"}),[]);return(0,o.jsxs)(c.Provider,{value:d,children:[l,(0,o.jsxs)("div",{children:[(0,o.jsxs)(s.Space,{size:"large",children:[(0,o.jsxs)(s.Space,{style:{width:"100%"},children:[(0,o.jsx)("span",{children:"Enabled: "}),(0,o.jsx)(s.Switch,{checked:t,onChange:t=>e(t)})]}),(0,o.jsxs)(s.Space,{style:{width:"100%"},children:[(0,o.jsx)("span",{children:"Threshold: "}),(0,o.jsx)(s.InputNumber,{disabled:!t,value:i,step:1,min:1,max:10,onChange:t=>n(t||0)})]})]}),(0,o.jsx)(s.Divider,{}),(0,o.jsx)(s.Button,{type:"primary",onClick:()=>{r.open({message:"Notification Title",description:`${Array(Math.round(5*Math.random())+1).fill("This is the content of the notification.").join("\n")}`,duration:null});},children:"Open the notification box"})]})]});};},"85bb6b55":function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return a;}});var n=i("f19d2b93");i("644a5c38");var o=i("a9d1a279"),a=()=>{let[t,e]=o.notification.useNotification();return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)(o.Button,{type:"primary",onClick:()=>{t.open({message:"Notification Title",description:"I will never close automatically. This is a purposely very very long description that has many many characters and words.",duration:0});},children:"Open the notification box"})]});};},c77438d7:function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return a;}});var n=i("f19d2b93");i("019c43a7");var o=i("a9d1a279"),a=()=>{let[t,e]=o.notification.useNotification();return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)(o.Button,{type:"primary",onClick:()=>{t.open({message:"Notification Title",description:"This is the content of the notification. This is the content of the notification. This is the content of the notification.",className:"custom-class",style:{width:600}});},children:"Open the notification box"})]});};},de38a927:function(t,e,i){"use strict";i.d(e,"__esModule",{value:!0}),i.d(e,"default",{enumerable:!0,get:function(){return s;}});var n=i("f19d2b93");i("97256acc");var o=i("a9d1a279");let a=()=>{console.log("Notification was closed. Either the close button was clicked or duration time elapsed.");};var s=()=>{let[t,e]=o.notification.useNotification();return(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)(o.Button,{type:"primary",onClick:()=>{let e=`open${Date.now()}`,i=(0,n.jsxs)(o.Space,{children:[(0,n.jsx)(o.Button,{type:"link",size:"small",onClick:()=>t.destroy(),children:"Destroy All"}),(0,n.jsx)(o.Button,{type:"primary",size:"small",onClick:()=>t.destroy(e),children:"Confirm"})]});t.open({message:"Notification Title",description:'A function will be be called after the notification is closed (automatically after the "duration" time of manually).',btn:i,key:e,onClose:a});},children:"Open the notification box"})]});};}}]); |