Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

548 B
Raw Blame
import { type ComboBoxProps, type ListProps, ComboBox as ZenComboBox } from '@umami/react-zen';

const defaultListProps: Partial<ListProps> = {
  style: {
    maxHeight: 'min(400px, calc(100dvh - 8rem))',
  },
};

export function ComboBox({ listProps, ...props }: ComboBoxProps) {
  const mergedListProps: ListProps = {
    ...defaultListProps,
    ...listProps,
    style: {
      ...defaultListProps.style,
      ...listProps?.style,
    },
  };

  return <ZenComboBox {...props} listProps={mergedListProps} />;
}

export type { ComboBoxProps };