UNPKG

softchatjs-react

Version:
2 lines 910 B
import{useState as s}from"react";import{jsx as t,jsxs as o}from"react/jsx-runtime";function l({connectionStatus:r,theme:e,onTextChange:a}){let[i,p]=s(""),d=n=>{p(n),a(n)};return o("div",{style:{width:"100%",padding:"20px"},children:[t("div",{children:r.isConnected?o("span",{style:{display:"flex",alignItems:"center",color:e.text.primary},children:[t("p",{style:{fontWeight:"bold",fontSize:"26px"},children:"Chats"}),t("span",{style:{marginLeft:10,height:"5px",width:"5px",borderRadius:"5px",backgroundColor:"green"}})]}):t("p",{style:{color:e.text.primary},children:"Connecting..."})}),t("input",{value:i,onChange:n=>d(n.target.value),placeholder:"Search chats",style:{height:"40px",width:"100%",marginTop:"15px",textIndent:"15px",backgroundColor:"transparent",border:`1px solid ${e.divider}`,borderRadius:"10px",color:e.text.primary}})]})}export{l as default}; //# sourceMappingURL=ConversationHeader.mjs.map