@ozen-ui/kit
Version:
React component library
17 lines (16 loc) • 842 B
JavaScript
import { __assign } from "tslib";
import React, { forwardRef } from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { Avatar } from '../../../Avatar';
import { LIST_CARD_ITEM_SIZE_TO_LEADING_AVATAR_SIZE } from '../../../ListCardItem';
import { useAutocompleteListCardContext } from '../../context';
export var AutocompleteListCardInputAvatar = forwardRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'AutocompleteListCardInputAvatar',
});
var autocompleteSize = useAutocompleteListCardContext().size;
var size = LIST_CARD_ITEM_SIZE_TO_LEADING_AVATAR_SIZE[autocompleteSize];
return React.createElement(Avatar, __assign({}, props, { ref: ref, size: size }));
});
AutocompleteListCardInputAvatar.displayName = 'AutocompleteListCardInputAvatar';