UNPKG

@base-ui/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.

33 lines (31 loc) 1.01 kB
'use client'; import * as React from 'react'; import { useRenderElement } from "../../internals/useRenderElement.js"; import { ComboboxRowContext } from "./ComboboxRowContext.js"; /** * Displays a single row of items in a grid list. * Enable `grid` on the root component to turn the listbox into a grid. * Renders a `<div>` element. * * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox) */ import { jsx as _jsx } from "react/jsx-runtime"; export const ComboboxRow = /*#__PURE__*/React.forwardRef(function ComboboxRow(componentProps, forwardedRef) { const { render, className, style, ...elementProps } = componentProps; const element = useRenderElement('div', componentProps, { ref: forwardedRef, props: [{ role: 'row' }, elementProps] }); return /*#__PURE__*/_jsx(ComboboxRowContext.Provider, { value: true, children: element }); }); if (process.env.NODE_ENV !== "production") ComboboxRow.displayName = "ComboboxRow";