UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

30 lines (29 loc) 777 B
import cx from 'classnames'; import * as React from 'react'; import { SvgCaretDownSmall } from '../../utils/index.js'; import { Icon } from '../Icon/Icon.js'; export const ComboBoxEndIcon = React.forwardRef((props, forwardedRef) => { let { className, children, disabled, isOpen, ...rest } = props; return React.createElement( Icon, { as: 'span', ref: forwardedRef, className: cx( 'iui-end-icon', { 'iui-disabled': disabled, 'iui-open': isOpen, }, className, ), ...rest, }, children ?? React.createElement(SvgCaretDownSmall, { 'aria-hidden': true, }), ); }); if ('development' === process.env.NODE_ENV) ComboBoxEndIcon.displayName = 'ComboBoxEndIcon';