UNPKG

@lobehub/ui

Version:

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

1 lines 1.41 kB
{"version":3,"file":"FloatingSheetHeader.mjs","names":[],"sources":["../../../src/base-ui/FloatingSheet/FloatingSheetHeader.tsx"],"sourcesContent":["import { cx } from 'antd-style';\nimport { type ReactNode } from 'react';\n\nimport { styles } from './style';\n\ninterface FloatingSheetHeaderProps {\n handleProps: {\n onMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;\n };\n headerActions?: ReactNode;\n isDragging: boolean;\n title?: ReactNode;\n}\n\nexport function FloatingSheetHeader({\n title,\n headerActions,\n isDragging,\n handleProps,\n}: FloatingSheetHeaderProps) {\n const s = styles;\n\n return (\n <div className={cx(s.header, isDragging && s.headerDragging)} {...handleProps}>\n <div className={s.handle} />\n <div className={s.headerContent}>\n {title && <div className={s.headerTitle}>{title}</div>}\n {headerActions && (\n <div className={s.headerActions} data-no-drag=\"\">\n {headerActions}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;AAcA,SAAgB,oBAAoB,EAClC,OACA,eACA,YACA,eAC2B;CAC3B,MAAM,IAAI;AAEV,QACE,qBAAC,OAAD;EAAK,WAAW,GAAG,EAAE,QAAQ,cAAc,EAAE,eAAe;EAAE,GAAI;YAAlE,CACE,oBAAC,OAAD,EAAK,WAAW,EAAE,QAAU,CAAA,EAC5B,qBAAC,OAAD;GAAK,WAAW,EAAE;aAAlB,CACG,SAAS,oBAAC,OAAD;IAAK,WAAW,EAAE;cAAc;IAAY,CAAA,EACrD,iBACC,oBAAC,OAAD;IAAK,WAAW,EAAE;IAAe,gBAAa;cAC3C;IACG,CAAA,CAEJ;KACF"}