1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[1933],{14314(e,t,l){l.r(t),l.d(t,{default:()=>N});var s=l(65043),r=l(31043),n=l(25852),i=l(13718),a=l(75304),c=l(38477),o=l(45056),h=l(44864),d=l(87382),A=l(34518),m=l.n(A),u=l(70579);class x extends s.Component{constructor(){super(...arguments),this.state={basicAlert:!1,titleAlert:!1,htmlAlert:!1},this.handleAlert=(e,t)=>{this.setState({[e]:t})}}render(){return(0,u.jsxs)(a.A,{children:[(0,u.jsx)(c.A,{children:(0,u.jsx)(o.A,{children:"Basic"})}),(0,u.jsxs)(h.A,{children:[(0,u.jsx)("p",{children:"SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizable, as you can see below!"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("basicAlert",!0),outline:!0,children:"Basic"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("titleAlert",!0),outline:!0,children:"With Title"}),(0,u.jsx)(d.A,{className:"mb-1",color:"primary",onClick:()=>this.handleAlert("htmlAlert",!0),outline:!0,children:"HTML"}),(0,u.jsx)(m(),{title:"Any fool can use a computer",show:this.state.basicAlert,onConfirm:()=>this.handleAlert("basicAlert",!1)}),(0,u.jsx)(m(),{title:"The Internet?,",show:this.state.titleAlert,onConfirm:()=>this.handleAlert("titleAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"That thing is still around?"})}),(0,u.jsx)(m(),{title:(0,u.jsxs)("strong",{children:["HTML ",(0,u.jsx)("u",{children:"example"})]}),show:this.state.htmlAlert,onConfirm:()=>this.handleAlert("htmlAlert",!1),children:(0,u.jsxs)("p",{className:"sweet-alert-text",children:["You can use bold text,"," ",(0,u.jsx)("a",{href:"http://pixinvent.com",target:"_blank",rel:"noopener noreferrer",children:"links"})," "," ","and other HTML tags"]})})]})]})}}const j=x;class p extends s.Component{constructor(){super(...arguments),this.state={successAlert:!1,errorAlert:!1,infoAlert:!1,warningAlert:!1},this.handleAlert=(e,t)=>{this.setState({[e]:t})}}render(){return(0,u.jsxs)(a.A,{children:[(0,u.jsx)(c.A,{children:(0,u.jsx)(o.A,{children:"Types"})}),(0,u.jsxs)(h.A,{children:[(0,u.jsx)("p",{children:'SweetAlert comes with 4 built-in types which will show a corresponding icon animation: "warning", "error", "success" and "info".'}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"success",onClick:()=>this.handleAlert("successAlert",!0),outline:!0,children:"Success"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"danger",onClick:()=>this.handleAlert("errorAlert",!0),outline:!0,children:"Error"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"warning",onClick:()=>this.handleAlert("warningAlert",!0),outline:!0,children:"Warning"}),(0,u.jsx)(d.A,{className:"mb-1",color:"info",onClick:()=>this.handleAlert("infoAlert",!0),outline:!0,children:"Info"}),(0,u.jsx)(m(),{success:!0,title:"Success",show:this.state.successAlert,onConfirm:()=>this.handleAlert("successAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})}),(0,u.jsx)(m(),{error:!0,title:"Error",show:this.state.errorAlert,onConfirm:()=>this.handleAlert("errorAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})}),(0,u.jsx)(m(),{info:!0,title:"Info!",show:this.state.infoAlert,onConfirm:()=>this.handleAlert("infoAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})}),(0,u.jsx)(m(),{warning:!0,title:"Warning",show:this.state.warningAlert,onConfirm:()=>this.handleAlert("warningAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})})]})]})}}const w=p;class f extends s.Component{constructor(){super(...arguments),this.state={imgAlert:!1,timerAlert:!1,outsideClickAlert:!1,overlayAlert:!1,inputAlert:!1},this.handleAlert=(e,t)=>{this.setState({[e]:t})}}render(){return(0,u.jsxs)(a.A,{children:[(0,u.jsx)(c.A,{children:(0,u.jsx)(o.A,{children:"Options"})}),(0,u.jsxs)(h.A,{children:[(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("imgAlert",!0),outline:!0,children:"Image"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("timerAlert",!0),outline:!0,children:"Timeout"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("overlayAlert",!0),outline:!0,children:"Overlay"}),(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("outsideClickAlert",!0),outline:!0,children:"Outside Click"}),(0,u.jsx)(d.A,{className:"mb-1",color:"primary",onClick:()=>this.handleAlert("inputAlert",!0),outline:!0,children:"Input Alert"}),(0,u.jsx)(m(),{title:"Sweet!",custom:!0,show:this.state.imgAlert,customIcon:"https://raw.githubusercontent.com/djorg83/react-bootstrap-sweetalert/master/demo/assets/thumbs-up.jpg",onConfirm:()=>this.handleAlert("imgAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"Sweet Alert with an image."})}),(0,u.jsx)(m(),{title:"Auto close alert!",timeout:2e3,show:this.state.timerAlert,onConfirm:()=>this.handleAlert("timerAlert",!1),onCancel:()=>this.handleAlert("timerAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"I will close in 2 seconds."})}),(0,u.jsx)(m(),{title:"Click outside to close!",closeOnClickOutside:!0,show:this.state.outsideClickAlert,onConfirm:()=>this.handleAlert("outsideClickAlert",!1),onCancel:()=>this.handleAlert("outsideClickAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})}),(0,u.jsx)(m(),{title:"No Overlay",hideOverlay:!0,show:this.state.overlayAlert,onConfirm:()=>this.handleAlert("overlayAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"You clicked the button!"})}),(0,u.jsx)(m(),{title:"An input!",input:!0,show:this.state.inputAlert,placeHolder:"Write something",onConfirm:()=>this.handleAlert("inputAlert",!1),children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"Write something interesting:"})})]})]})}}const C=f;class b extends s.Component{constructor(){super(...arguments),this.state={defaultAlert:!1,confirmAlert:!1,cancelAlert:!1},this.handleAlert=(e,t)=>{this.setState({[e]:t})}}render(){return(0,u.jsxs)(a.A,{children:[(0,u.jsx)(c.A,{children:(0,u.jsx)(o.A,{children:"Callback"})}),(0,u.jsxs)(h.A,{children:[(0,u.jsx)(d.A,{className:"mr-1 mb-1",color:"primary",onClick:()=>this.handleAlert("defaultAlert",!0),outline:!0,children:"Callback"}),(0,u.jsx)(m(),{title:"Are you sure?",warning:!0,show:this.state.defaultAlert,showCancel:!0,reverseButtons:!0,cancelBtnBsStyle:"danger",confirmBtnText:"Yes, delete it!",cancelBtnText:"Cancel",onConfirm:()=>{this.handleAlert("basicAlert",!1),this.handleAlert("confirmAlert",!0)},onCancel:()=>{this.handleAlert("basicAlert",!1),this.handleAlert("cancelAlert",!0)},children:"You won't be able to revert this!"}),(0,u.jsx)(m(),{success:!0,title:"Deleted!",confirmBtnBsStyle:"success",show:this.state.confirmAlert,onConfirm:()=>{this.handleAlert("defaultAlert",!1),this.handleAlert("confirmAlert",!1)},children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"Your file has been deleted."})}),(0,u.jsx)(m(),{error:!0,title:"Cancelled",confirmBtnBsStyle:"success",show:this.state.cancelAlert,onConfirm:()=>{this.handleAlert("defaultAlert",!1),this.handleAlert("cancelAlert",!1)},children:(0,u.jsx)("p",{className:"sweet-alert-text",children:"Your imaginary file is safe :)"})})]})]})}}const k=b;class g extends s.Component{render(){return(0,u.jsxs)(s.Fragment,{children:[(0,u.jsx)(r.A,{title:"Sweet Alerts",subTitle:"A React implementation of SweetAlert",link:"https://github.com/djorg83/react-bootstrap-sweetalert"}),(0,u.jsxs)(n.A,{children:[(0,u.jsx)(i.A,{sm:"12",children:(0,u.jsx)(j,{})}),(0,u.jsx)(i.A,{sm:"12",children:(0,u.jsx)(w,{})}),(0,u.jsx)(i.A,{sm:"12",children:(0,u.jsx)(C,{})}),(0,u.jsx)(i.A,{sm:"12",children:(0,u.jsx)(k,{})})]})]})}}const N=g},31043(e,t,l){l.d(t,{A:()=>c});var s=l(65043),r=l(25852),n=l(13718),i=l(70579);class a extends s.Component{render(){return(0,i.jsx)(r.A,{className:"mb-2",children:(0,i.jsxs)(n.A,{sm:"12",className:"ml-50",children:[(0,i.jsx)("p",{className:"font-medium-5 mt-1 extension-title","data-tour":"extension-title",children:this.props.title}),this.props.link?(0,i.jsx)("a",{href:this.props.link,target:"_blank",rel:"noopener noreferrer",children:this.props.subTitle}):(0,i.jsx)("p",{className:"text-primary",children:this.props.subTitle})]})})}}const c=a}}]); 2//# sourceMappingURL=1933.b5e69086.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.