timc1 / kbar

fast, portable, and extensible cmd+k interface for your site
https://kbar.vercel.app
MIT License
4.87k stars 184 forks source link

KBarPortal is not have container props in v0.1.0-beta.40 release #311

Closed KimWooHyun closed 1 year ago

KimWooHyun commented 1 year ago

Hello, I found that source code is not have container in https://github.com/timc1/kbar/releases/tag/v0.1.0-beta.40 But, main has container https://github.com/timc1/kbar/blob/main/src/KBarPortal.tsx

release zip code

import { Portal } from "@radix-ui/react-portal";
import * as React from "react";
import { VisualState } from "./types";
import { useKBar } from "./useKBar";

interface Props {
  children: React.ReactNode;
}

export function KBarPortal(props: Props) {
  const { showing } = useKBar((state) => ({
    showing: state.visualState !== VisualState.hidden,
  }));

  if (!showing) {
    return null;
  }

  return <Portal>{props.children}</Portal>;
}
stale[bot] commented 1 year ago

Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.