0

我正在使用IBM 的 Carbon UI 设计。如何ExapandableSearch在 ReactJS 应用程序中实现组件?

我试过了

import {  ExpandableSearch } from 'carbon-components-react'

  const props = () => ({
    className: 'some-class',
    size: 'xl',
    light: false,
    disabled: false,
    name: 'ff',
    defaultValue: 'ccc',
    labelText: 'Search',
    closeButtonLabelText: 'Clear search input',
    placeholder: 'Search',
    onChange: () => {},
  })

function search = () => {
   return <ExpandableSearch
        {...props}
        labelText="search"
        id="search-expandable-1"
   />
}

错误

元素类型无效:应为字符串(用于内置组件)或类/函数(用于复合组件)但得到:未定义。您可能忘记从定义组件的文件中导出组件,或者您可能混淆了默认导入和命名导入。

任何形式的帮助将不胜感激

4

0 回答 0