UNPKG

@lobehub/ui

Version:

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

1 lines 1.54 kB
{"version":3,"file":"AuroraBackground.mjs","names":["Flexbox"],"sources":["../../../src/awesome/AuroraBackground/AuroraBackground.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useThemeMode } from 'antd-style';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\n\nimport { styles } from './style';\nimport type { AuroraBackgroundProps } from './type';\n\nconst AuroraBackground = memo<AuroraBackgroundProps>(\n ({ ref, classNames, styles: customStyles, children, ...rest }) => {\n const { isDarkMode } = useThemeMode();\n return (\n <Flexbox ref={ref} {...rest}>\n <Flexbox className={cx(styles.wrapper, classNames?.wrapper)} style={customStyles?.wrapper}>\n <div className={isDarkMode ? styles.bgDark : styles.bgLight} />\n </Flexbox>\n <Flexbox\n className={classNames?.content}\n flex={1}\n style={{ zIndex: 1, ...customStyles?.content }}\n width={'100%'}\n >\n {children}\n </Flexbox>\n </Flexbox>\n );\n },\n);\n\nAuroraBackground.displayName = 'AuroraBackground';\n\nexport default AuroraBackground;\n"],"mappings":";;;;;;;;;AAUA,MAAM,mBAAmB,MACtB,EAAE,KAAK,YAAY,QAAQ,cAAc,UAAU,GAAG,WAAW;CAChE,MAAM,EAAE,eAAe,cAAc;AACrC,QACE,qBAACA;EAAa;EAAK,GAAI;aACrB,oBAACA;GAAQ,WAAW,GAAG,OAAO,SAAS,YAAY,QAAQ;GAAE,OAAO,cAAc;aAChF,oBAAC,SAAI,WAAW,aAAa,OAAO,SAAS,OAAO,UAAW;IACvD,EACV,oBAACA;GACC,WAAW,YAAY;GACvB,MAAM;GACN,OAAO;IAAE,QAAQ;IAAG,GAAG,cAAc;IAAS;GAC9C,OAAO;GAEN;IACO;GACF;EAGf;AAED,iBAAiB,cAAc;AAE/B,+BAAe"}