UNPKG

@lobehub/ui

Version:

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

58 lines (57 loc) 1.58 kB
'use client'; 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; if (desc) return /*#__PURE__*/_jsxs(Flexbox, { align: 'center', flex: 1, gap: 4, justify: 'center', children: [/*#__PURE__*/_jsxs(Flexbox, { align: 'center', className: styles.titleContainer, gap: 4, horizontal: true, children: [/*#__PURE__*/_jsx("div", { className: styles.titleWithDesc, children: title }), tag && /*#__PURE__*/_jsx(Flexbox, { className: styles.tag, horizontal: true, children: tag })] }), /*#__PURE__*/_jsx(Flexbox, { align: 'center', horizontal: true, children: /*#__PURE__*/_jsx("div", { className: styles.desc, children: desc }) })] }); return /*#__PURE__*/_jsxs(Flexbox, { align: 'center', flex: 1, gap: 4, horizontal: true, justify: 'center', children: [/*#__PURE__*/_jsx("div", { className: styles.title, children: title }), /*#__PURE__*/_jsx(Flexbox, { className: styles.tag, horizontal: true, children: tag })] }); }); ChatHeaderTitle.displayName = 'ChatHeaderTitle'; export default ChatHeaderTitle;