#reactjs #typescript #user-interface #carbon
Вопрос:
Я использую дизайн пользовательского интерфейса IBM Carbon, как я могу реализовать ExapandableSearch
компонент в приложении ReactJS
https://react.carbondesignsystem.com/?path=/story/components-search—expandable
https://www.carbondesignsystem.com/
Я попробовал следующий метод
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"
/>
}
Ошибка
Error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Любая помощь будет очень признательна