'use client';

export function NavHeader({ onCloseMobile }: { onCloseMobile?: () => void }) {
  return (
    <div className="sticky top-0 flex items-center justify-between border-b border-neutral-100 bg-white px-3 py-0.5">
      {onCloseMobile ? (
        <button
          type="button"
          className="rounded p-1 text-neutral-500 hover:bg-neutral-100 md:hidden"
          aria-label="关闭菜单"
          onClick={onCloseMobile}
        >
          <span aria-hidden>✕</span>
        </button>
      ) : null}
    </div>
  );
}
