UNPKG

@lobehub/ui

Version:

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

1 lines 1.67 kB
{"version":3,"file":"Footer.mjs","names":["Flexbox"],"sources":["../../src/Footer/Footer.tsx"],"sourcesContent":["'use client';\n\nimport RcFooter from 'rc-footer';\nimport { memo, useMemo } from 'react';\n\nimport { Flexbox } from '@/Flex';\n\nimport { styles } from './style';\nimport type { FooterProps } from './type';\n\nconst Footer = memo<FooterProps>(\n ({ columns, bottom, theme, contentMaxWidth = 960, children, style, ...rest }) => {\n const isEmpty = !columns || columns?.length === 0;\n\n // Convert contentMaxWidth prop to CSS variable\n const cssVariables = useMemo<Record<string, string>>(\n () => ({\n '--footer-content-max-width': `${contentMaxWidth}px`,\n }),\n [contentMaxWidth],\n );\n\n return (\n <Flexbox\n as={'section'}\n className={styles.root}\n style={{\n ...cssVariables,\n ...style,\n }}\n width={'100%'}\n {...rest}\n >\n <RcFooter\n bottom={bottom}\n className={isEmpty ? styles.footerEmpty : styles.footer}\n columns={columns}\n theme={theme}\n />\n {children}\n </Flexbox>\n );\n },\n);\n\nFooter.displayName = 'Footer';\n\nexport default Footer;\n"],"mappings":";;;;;;;;;AAUA,MAAM,SAAS,MACZ,EAAE,SAAS,QAAQ,OAAO,kBAAkB,KAAK,UAAU,OAAO,GAAG,WAAW;CAC/E,MAAM,UAAU,CAAC,WAAW,SAAS,WAAW;CAGhD,MAAM,eAAe,eACZ,EACL,8BAA8B,GAAG,gBAAgB,KAClD,GACD,CAAC,gBAAgB,CAClB;AAED,QACE,qBAACA;EACC,IAAI;EACJ,WAAW,OAAO;EAClB,OAAO;GACL,GAAG;GACH,GAAG;GACJ;EACD,OAAO;EACP,GAAI;aAEJ,oBAAC;GACS;GACR,WAAW,UAAU,OAAO,cAAc,OAAO;GACxC;GACF;IACP,EACD;GACO;EAGf;AAED,OAAO,cAAc;AAErB,qBAAe"}