@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 1.33 kB
Source Map (JSON)
{"version":3,"file":"TextArea.mjs","names":["AntInput"],"sources":["../../src/Input/TextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Input as AntInput } from 'antd';\nimport { cx, useThemeMode } from 'antd-style';\nimport { memo } from 'react';\n\nimport { variants } from './style';\nimport type { TextAreaProps } from './type';\n\nconst TextArea = memo<TextAreaProps>(\n ({ ref, variant, shadow, className, resize = false, style, ...rest }) => {\n const { isDarkMode } = useThemeMode();\n\n return (\n <AntInput.TextArea\n className={cx(\n variants({ shadow, variant: variant || (isDarkMode ? 'filled' : 'outlined') }),\n className,\n )}\n ref={ref}\n style={{\n resize: resize ? undefined : 'none',\n ...style,\n }}\n variant={variant || (isDarkMode ? 'filled' : 'outlined')}\n {...rest}\n />\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n"],"mappings":";;;;;;;;;AASA,MAAM,WAAW,MACd,EAAE,KAAK,SAAS,QAAQ,WAAW,SAAS,OAAO,OAAO,GAAG,WAAW;CACvE,MAAM,EAAE,eAAe,cAAc;AAErC,QACE,oBAACA,MAAS;EACR,WAAW,GACT,SAAS;GAAE;GAAQ,SAAS,YAAY,aAAa,WAAW;GAAa,CAAC,EAC9E,UACD;EACI;EACL,OAAO;GACL,QAAQ,SAAS,SAAY;GAC7B,GAAG;GACJ;EACD,SAAS,YAAY,aAAa,WAAW;EAC7C,GAAI;GACJ;EAGP;AAED,SAAS,cAAc;AAEvB,uBAAe"}