fix: replace hint paragraphs with InfoTip tooltips in NodeFormDecision
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { NodePicker } from './NodePicker'
|
|||||||
import { useTreeEditorStore } from '@/store/treeEditorStore'
|
import { useTreeEditorStore } from '@/store/treeEditorStore'
|
||||||
import type { TreeStructure, TreeOption } from '@/types'
|
import type { TreeStructure, TreeOption } from '@/types'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
import { InfoTip } from '@/components/common/InfoTip'
|
||||||
|
|
||||||
interface NodeFormDecisionProps {
|
interface NodeFormDecisionProps {
|
||||||
node: TreeStructure
|
node: TreeStructure
|
||||||
@@ -86,11 +87,6 @@ export function NodeFormDecision({ node, onUpdate }: NodeFormDecisionProps) {
|
|||||||
<label className="block text-sm font-medium text-foreground">
|
<label className="block text-sm font-medium text-foreground">
|
||||||
{isRootNode ? 'Starting Question' : 'Question'} <span className="text-red-400">*</span>
|
{isRootNode ? 'Starting Question' : 'Question'} <span className="text-red-400">*</span>
|
||||||
</label>
|
</label>
|
||||||
{isRootNode && (
|
|
||||||
<p className="mt-0.5 text-xs text-muted-foreground">
|
|
||||||
What's the main question to diagnose the issue?
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={node.question || ''}
|
value={node.question || ''}
|
||||||
@@ -130,18 +126,12 @@ export function NodeFormDecision({ node, onUpdate }: NodeFormDecisionProps) {
|
|||||||
|
|
||||||
{/* Options */}
|
{/* Options */}
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-foreground">
|
<label className="flex items-center gap-1.5 text-sm font-medium text-foreground">
|
||||||
{isRootNode ? 'Answer Options (Branches)' : 'Options'} <span className="text-red-400">*</span>
|
{isRootNode ? 'Answer Options (Branches)' : 'Options'} <span className="text-red-400">*</span>
|
||||||
|
<InfoTip text={isRootNode
|
||||||
|
? "Add as many options as needed (A, B, C, D...). Each option leads to a different troubleshooting path."
|
||||||
|
: "Each option can branch to a different next step."} />
|
||||||
</label>
|
</label>
|
||||||
{isRootNode ? (
|
|
||||||
<p className="mt-0.5 text-xs text-muted-foreground">
|
|
||||||
Add as many options as needed (A, B, C, D...). Each option leads to a completely different troubleshooting path.
|
|
||||||
</p>
|
|
||||||
) : (
|
|
||||||
<p className="mt-0.5 text-xs text-muted-foreground">
|
|
||||||
Each option can branch to a different next step.
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{optionsError && (
|
{optionsError && (
|
||||||
<p className="mt-1 text-xs text-red-400">{optionsError.message}</p>
|
<p className="mt-1 text-xs text-red-400">{optionsError.message}</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user