UNPKG

@lobehub/ui

Version:

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

1 lines 1.09 kB
{"version":3,"file":"Input.mjs","names":["Input","AntInput"],"sources":["../../src/Input/Input.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 { InputProps } from './type';\n\nconst Input = memo<InputProps>(({ ref, variant, shadow, className, ...rest }) => {\n const { isDarkMode } = useThemeMode();\n\n return (\n <AntInput\n className={cx(\n variants({ shadow, variant: variant || (isDarkMode ? 'filled' : 'outlined') }),\n className,\n )}\n ref={ref}\n variant={variant || (isDarkMode ? 'filled' : 'outlined')}\n {...rest}\n />\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;;;;AASA,MAAMA,UAAQ,MAAkB,EAAE,KAAK,SAAS,QAAQ,WAAW,GAAG,WAAW;CAC/E,MAAM,EAAE,eAAe,cAAc;AAErC,QACE,oBAACC;EACC,WAAW,GACT,SAAS;GAAE;GAAQ,SAAS,YAAY,aAAa,WAAW;GAAa,CAAC,EAC9E,UACD;EACI;EACL,SAAS,YAAY,aAAa,WAAW;EAC7C,GAAI;GACJ;EAEJ;AAEF,QAAM,cAAc;AAEpB,oBAAeD"}