Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

715 B
Raw Blame
"use client";

import Tooltip from "@/shared/components/Tooltip";

type FieldLabelWithHelpProps = {
  label: string;
  help: string;
  showHelp?: boolean;
  htmlFor?: string;
};

export default function FieldLabelWithHelp({
  label,
  help,
  showHelp = true,
  htmlFor,
}: FieldLabelWithHelpProps) {
  return (
    <div className="flex items-center gap-1 mb-0.5">
      <label htmlFor={htmlFor} className="text-[10px] text-text-muted">
        {label}
      </label>
      {showHelp && (
        <Tooltip position="bottom" content={help}>
          <span className="material-symbols-outlined text-[12px] text-text-muted cursor-help">
            help
          </span>
        </Tooltip>
      )}
    </div>
  );
}