UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

2 lines (1 loc) 1.49 kB
import{__rest as o}from"tslib";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useCallback as e}from"react";import{BookmarkStyled as a,BookmarkName as i,BookmarkCloseButton as l}from"./styled.js";import{Skeleton as s}from"../skeleton/index.js";export{BookmarkCardAction,BookmarkCardActions,BookmarkCardBody,BookmarkCardChatList,BookmarkCardChats,BookmarkCardContent,BookmarkCardDeleteAction,BookmarkCardEditAction,BookmarkCardHead,BookmarkCardMain,BookmarkCardName,BookmarkCardStyled,BookmrakCardLine}from"./card/styled.js";import"./card/chat/styled.js";import"../icon/styled.js";import"@react-spring/web";import"react-markdown";import"react-dom";import"../portal/styled.js";import"../tooltip/styled.js";import"../tooltip/arrow/styled.js";import"../../theme/index.js";import"../tooltip/context.js";export{AddBookmarkButton,BookmarkList,BookmarkListContent,BookmarkListScrollbarWrapper,BookmarksContent,BookmarksStyled}from"./list/styled.js";const k=k=>{var m,{className:n,closeAriaLabel:d}=k,c=o(k,["className","closeAriaLabel"]);const C=null!==(m=!c.skeleton&&c.active)&&void 0!==m&&m,p=e(o=>{var t;1===o.button&&(null===(t=c.onClose)||void 0===t||t.call(c,o))},[c.onClose]);return t(a,{$active:C,$skeleton:c.skeleton,className:n,onClick:c.onClick,onAuxClick:p,children:[t(i,{children:[!c.skeleton&&c.children,c.skeleton&&r(s,{width:80})]}),!c.skeleton&&!c.disableClose&&r(l,{"aria-label":d,onClick:c.onClose}),c.skeleton&&r(s,{width:18,height:18})]})};export{k as Bookmark};