@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
27 lines (25 loc) • 773 B
JavaScript
'use client';
import * as React from 'react';
import { useRenderElement } from "../../utils/useRenderElement.js";
/**
* An icon that indicates that the trigger button opens a select menu.
* Renders a `<span>` element.
*
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
*/
export const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {
const {
className,
render,
...elementProps
} = componentProps;
const element = useRenderElement('span', componentProps, {
ref: forwardedRef,
props: [{
'aria-hidden': true,
children: '▼'
}, elementProps]
});
return element;
});
if (process.env.NODE_ENV !== "production") SelectIcon.displayName = "SelectIcon";