UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

2 lines (1 loc) 2.05 kB
import{jsx as t,jsxs as r}from"react/jsx-runtime";import{SidebarUserInfoStyled as e,SidebarUserInfoContent as o,SidebarUserInfoMain as i,SidebarUserInfoLeft as s,SidebarUserInfoText as n,SidebarUserInfoName as a,SidebarUserInfoCaps as d,SidebarUserInfoLogoutButtonContainer as l,SidebarUserInfoBottom as p,SidebarUserInfoUpdateTariffContainer as c}from"./styled.js";export{SidebarUserInfoLogoutButton,SidebarUserInfoTariff,SidebarUserInfoTariffContainer,SidebarUserInfoUpdateTariffBadge,SidebarUserInfoUpdateTariffBadgeText,SidebarUserInfoUpdateTariffButton,SidebarUserInfoUpdateTariffButtonText}from"./styled.js";import{useSidebar as m}from"../context.js";import{SidebarUserInfoProvider as f}from"./context.js";export{SidebarUserInfoConsumer,SidebarUserInfoContext,useSidebarUserInfo}from"./context.js";import"tslib";import"./avatar/styled.js";import"react";import"@react-spring/web";import"react-dom";import"../../portal/styled.js";import"../../tooltip/styled.js";import"../../tooltip/arrow/styled.js";import"../../../theme/index.js";import"../../tooltip/context.js";import"../../skeleton/index.js";import"./skeleton/styled.js";import"../../button/styled.js";import"../../icon/styled.js";import"../../../icons/info/index.js";import"../../../utils/colors/calculateGrayScale.js";import"../../../utils/colors/calculateAccentColors.js";const j=({avatar:j,name:u,caps:x,updateTariff:U,logout:b,linkAs:h,to:S,onClick:y})=>{const{isOpen:I}=m();return t(f,{caps:x,children:t(e,{$open:I,children:r(o,{children:[r(i,{as:h,to:S,onClick:y,children:[r(s,{children:[j,r(n,{children:[u&&t(a,{children:u}),x&&t(d,{children:x})]})]}),t(l,{$open:I,children:b})]}),t(p,{children:t(c,{$open:I,children:U})})]})})})};export{j as SidebarUserInfo,p as SidebarUserInfoBottom,d as SidebarUserInfoCaps,o as SidebarUserInfoContent,s as SidebarUserInfoLeft,l as SidebarUserInfoLogoutButtonContainer,i as SidebarUserInfoMain,a as SidebarUserInfoName,f as SidebarUserInfoProvider,e as SidebarUserInfoStyled,n as SidebarUserInfoText,c as SidebarUserInfoUpdateTariffContainer};