(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[840],{71850:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poc/form-experiments/FormikAntFormItem",function(){return t(35716)}])},95813:function(e,l,t){"use strict";t.d(l,{S:function(){return a}});let a={input:"default text",radio:"2",checkbox:!0,switch:!0,select:"2",multiselect:["2"],tags:["1"],date:"",number:12}},35716:function(e,l,t){"use strict";t.r(l),t.d(l,{FormikAntFormItemPOC:function(){return u}});var a=t(24246),n=t(38355),c=t(3124),o=t.n(c),r=t(34090),s=t(95813);let{Title:i}=n.AntTypography,u=()=>(0,a.jsx)(r.J9,{initialValues:{...s.S},onSubmit:console.log,children:e=>{let{values:l,setFieldValue:t}=e;return(0,a.jsxs)(n.bue,{children:[(0,a.jsxs)(n.JGx,{span:12,children:[(0,a.jsx)(i,{level:2,children:"<Formik> + Controlled + Ant's <Form.Item>"}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(n.j8w,{color:"green",children:"funcitonal"}),(0,a.jsx)(n.j8w,{color:"orange",children:"mid effort"})]}),(0,a.jsx)(r.l0,{children:(0,a.jsxs)(n.jqI,{vertical:!0,children:[(0,a.jsx)(n.PPS.Item,{label:"Input",name:"input",layout:"vertical",children:(0,a.jsx)(n.uFc,{onChange:e=>t("input",e.target.value),defaultValue:l.input})}),(0,a.jsxs)(n.y02.Group,{name:"radio",onChange:e=>t("radio",e.target.value),defaultValue:l.radio,children:[(0,a.jsx)(n.y02,{value:"1",children:"Radio 1"}),(0,a.jsx)(n.y02,{value:"2",children:"Radio 2"})]}),(0,a.jsx)(n.PPS.Item,{name:"checkbox",children:(0,a.jsx)(n.E_O,{onChange:e=>t("checkbox",e.target.checked),defaultChecked:l.checkbox,children:"Checkbox"})}),(0,a.jsx)(n.PPS.Item,{label:"Switch",name:"switch",layout:"vertical",children:(0,a.jsx)(n.rAg,{onChange:e=>t("switch",e),defaultChecked:l.switch})}),(0,a.jsx)(n.PPS.Item,{label:"Select",name:"select",layout:"vertical",children:(0,a.jsx)(n.WPr,{allowClear:!0,className:"w-full",defaultValue:l.select,onChange:e=>t("select",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,a.jsx)(n.PPS.Item,{label:"Multiselect",name:"multiselect",layout:"vertical",children:(0,a.jsx)(n.WPr,{mode:"multiple",allowClear:!0,className:"w-full",defaultValue:l.multiselect,onChange:e=>t("multiselect",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,a.jsx)(n.PPS.Item,{label:"Tags",name:"tags",layout:"vertical",children:(0,a.jsx)(n.WPr,{mode:"tags",allowClear:!0,className:"w-full",defaultValue:l.tags,onChange:e=>t("tags",e),options:[{value:"1",label:"Option 1"},{value:"2",label:"Option 2"}]})}),(0,a.jsx)(n.PPS.Item,{label:"Date",name:"date",layout:"vertical",children:(0,a.jsx)(n.cv2,{onChange:e=>t("date",e.toISOString())})}),(0,a.jsx)(n.PPS.Item,{label:"Number",name:"number",layout:"vertical",children:(0,a.jsx)(n.W7D,{defaultValue:l.number,onChange:e=>t("number",e)})})]})})]}),(0,a.jsxs)(n.JGx,{span:8,offset:4,children:[(0,a.jsx)(i,{level:4,children:"Controlled Values"}),(0,a.jsx)(n.V4A,{style:{backgroundColor:o().FIDESUI_MINOS,color:o().FIDESUI_CORINTH},children:(0,a.jsx)("pre",{children:(0,a.jsxs)("code",{children:["{\n",Object.keys(l).map(e=>"  ".concat(e,": ").concat(l[e],"\n")),"}"]})})})]})]})}});l.default=u}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=71850)}),_N_E=e.O()}]);