UNPKG

@lobehub/ui

Version:

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

1 lines 1.3 kB
{"version":3,"file":"MaskShadow.mjs","names":["Flexbox"],"sources":["../../src/MaskShadow/MaskShadow.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { memo, useMemo } from 'react';\n\nimport { Flexbox } from '@/Flex';\n\nimport { variants } from './style';\nimport type { MaskShadowProps } from './type';\n\nconst MaskShadow = memo<MaskShadowProps>(\n ({ className, children, position = 'bottom', size = 40, ...rest }) => {\n // Convert size prop to CSS variable\n const cssVariables = useMemo<Record<string, string>>(\n () => ({\n '--mask-shadow-size': `${size}%`,\n }),\n [size],\n );\n\n return (\n <Flexbox\n className={cx(variants({ position }), className)}\n style={{\n ...cssVariables,\n ...rest.style,\n }}\n {...rest}\n >\n {children}\n </Flexbox>\n );\n },\n);\n\nMaskShadow.displayName = 'MaskShadow';\n\nexport default MaskShadow;\n"],"mappings":";;;;;;;;;AAUA,MAAM,aAAa,MAChB,EAAE,WAAW,UAAU,WAAW,UAAU,OAAO,IAAI,GAAG,WAAW;CAEpE,MAAM,eAAe,eACZ,EACL,sBAAsB,GAAG,KAAK,IAC/B,GACD,CAAC,KAAK,CACP;AAED,QACE,oBAACA;EACC,WAAW,GAAG,SAAS,EAAE,UAAU,CAAC,EAAE,UAAU;EAChD,OAAO;GACL,GAAG;GACH,GAAG,KAAK;GACT;EACD,GAAI;EAEH;GACO;EAGf;AAED,WAAW,cAAc;AAEzB,yBAAe"}