@ozen-ui/kit
Version:
React component library
19 lines (18 loc) • 1.3 kB
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { cn } from '../../../../utils/classname';
import { polymorphicComponentWithRef } from '../../../../utils/polymorphicComponentWithRef';
import { DATA_LIST_BASE_ITEM_DISPLAY_NAME } from '../../../DataListBase';
import { DataListCardItem } from '../../../DataListCard';
import { AUTOCOMPLETE_LIST_CARD_ITEM_DEFAULT_TAG } from './constants';
export var cnAutocompleteListCardItem = cn('AutocompleteListCardItem');
export var AutocompleteListCardItem = polymorphicComponentWithRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'AutocompleteListCardItem',
});
var children = props.children, className = props.className, _a = props.as, as = _a === void 0 ? AUTOCOMPLETE_LIST_CARD_ITEM_DEFAULT_TAG : _a, listId = props.listId, disabled = props.disabled, other = __rest(props, ["children", "className", "as", "listId", "disabled"]);
return (React.createElement(DataListCardItem, __assign({ ref: ref, as: as, className: cnAutocompleteListCardItem('', [className]) }, other, { listId: listId, disabled: disabled }), children));
});
AutocompleteListCardItem.displayName = DATA_LIST_BASE_ITEM_DISPLAY_NAME;