UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

48 lines 1.37 kB
import { memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import { useTitleStyles as useStyles } from "./style"; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref) { var title = _ref.title, desc = _ref.desc, tag = _ref.tag; var _useStyles = useStyles(), styles = _useStyles.styles; var tagContent = tag && /*#__PURE__*/_jsx(Flexbox, { align: 'center', className: styles.tag, horizontal: true, children: tag }); if (desc) return /*#__PURE__*/_jsxs(Flexbox, { className: styles.container, gap: 4, children: [/*#__PURE__*/_jsxs(Flexbox, { align: 'center', className: styles.titleContainer, gap: 8, horizontal: true, children: [/*#__PURE__*/_jsx("div", { className: styles.titleWithDesc, children: title }), tagContent] }), /*#__PURE__*/_jsx(Flexbox, { align: 'center', className: styles.desc, horizontal: true, children: desc })] }); return /*#__PURE__*/_jsxs(Flexbox, { align: 'center', className: styles.container, gap: 8, horizontal: true, children: [/*#__PURE__*/_jsx("div", { className: styles.title, children: title }), tagContent] }); }); export default ChatHeaderTitle;