UNPKG

@while-and-for/tremor-react

Version:

The React library to build dashboards faster.

3 lines (2 loc) 1.39 kB
'use client'; import{__rest as e}from"tslib";import t from"react";import{sizing as r}from"../../../lib/sizing.js";import{spacing as a}from"../../../lib/spacing.js";import{makeClassName as o}from"../../../lib/utils.js";import{tremorTwMerge as m}from"../../../lib/tremorTwMerge.js";import{Combobox as n}from"@headlessui/react";const i=o("SearchSelectItem"),c=t.forwardRef(((o,c)=>{const{value:s,icon:d,className:l,children:u}=o,g=e(o,["value","icon","className","children"]),p=d;return t.createElement(n.Option,Object.assign({className:m(i("root"),"flex justify-start items-center cursor-default text-tremor-default","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",a.md.paddingX,a.md.paddingY,l),ref:c,key:s,value:s},g),p&&t.createElement(p,{className:m(i("icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",r.lg.height,r.lg.width,a.lg.marginRight)}),t.createElement("span",{className:"whitespace-nowrap truncate"},null!=u?u:s))}));c.displayName="SearchSelectItem";export{c as default};