@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 1.62 kB
Source Map (JSON)
{"version":3,"file":"Divider.mjs","names":[],"sources":["../../../src/base-ui/Divider/Divider.tsx"],"sourcesContent":["'use client';\n\nimport { Separator } from '@base-ui/react/separator';\nimport { cx } from 'antd-style';\nimport { memo } from 'react';\n\nimport { styles } from './style';\nimport type { DividerProps } from './type';\n\nconst Divider = memo<DividerProps>(\n ({ children, className, dashed = false, orientation = 'horizontal', ref, ...rest }) => {\n if (children != null && orientation === 'horizontal') {\n return (\n <Separator\n className={cx(styles.withText, dashed && styles.dashed, className)}\n orientation=\"horizontal\"\n ref={ref}\n {...rest}\n >\n <span className={styles.text}>{children}</span>\n </Separator>\n );\n }\n\n return (\n <Separator\n orientation={orientation}\n ref={ref}\n className={cx(\n orientation === 'vertical' ? styles.vertical : styles.horizontal,\n dashed && styles.dashed,\n className,\n )}\n {...rest}\n />\n );\n },\n);\n\nDivider.displayName = 'Divider';\n\nexport default Divider;\n"],"mappings":";;;;;;;AASA,MAAM,UAAU,MACb,EAAE,UAAU,WAAW,SAAS,OAAO,cAAc,cAAc,KAAK,GAAG,WAAW;CACrF,IAAI,YAAY,QAAQ,gBAAgB,cACtC,OACE,oBAAC,WAAD;EACE,WAAW,GAAG,OAAO,UAAU,UAAU,OAAO,QAAQ,SAAS;EACjE,aAAY;EACP;EACL,GAAI;EAEJ,UAAA,oBAAC,QAAD;GAAM,WAAW,OAAO;GAAO;EAAe,CAAA;CACrC,CAAA;CAIf,OACE,oBAAC,WAAD;EACe;EACR;EACL,WAAW,GACT,gBAAgB,aAAa,OAAO,WAAW,OAAO,YACtD,UAAU,OAAO,QACjB,SACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AAEA,QAAQ,cAAc"}