fix: replace hint paragraphs with InfoTip tooltips in NodeFormAction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { DynamicArrayField } from './DynamicArrayField'
|
|||||||
import { NodePicker } from './NodePicker'
|
import { NodePicker } from './NodePicker'
|
||||||
import { useTreeEditorStore } from '@/store/treeEditorStore'
|
import { useTreeEditorStore } from '@/store/treeEditorStore'
|
||||||
import { MarkdownContent } from '@/components/ui/MarkdownContent'
|
import { MarkdownContent } from '@/components/ui/MarkdownContent'
|
||||||
|
import { InfoTip } from '@/components/common/InfoTip'
|
||||||
import type { TreeStructure } from '@/types'
|
import type { TreeStructure } from '@/types'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
@@ -75,8 +76,9 @@ export function NodeFormAction({ node, onUpdate }: NodeFormActionProps) {
|
|||||||
{/* Description */}
|
{/* Description */}
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<label className="block text-sm font-medium text-foreground">
|
<label className="flex items-center gap-1.5 text-sm font-medium text-foreground">
|
||||||
Description
|
Description
|
||||||
|
<InfoTip text="Supports markdown: **bold**, *italic*, - lists, 1. numbered lists, `code`" />
|
||||||
</label>
|
</label>
|
||||||
{node.description && (
|
{node.description && (
|
||||||
<button
|
<button
|
||||||
@@ -88,9 +90,6 @@ export function NodeFormAction({ node, onUpdate }: NodeFormActionProps) {
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-1 text-xs text-muted-foreground">
|
|
||||||
Supports markdown: **bold**, *italic*, - lists, 1. numbered lists, `code`
|
|
||||||
</p>
|
|
||||||
{showPreview && node.description ? (
|
{showPreview && node.description ? (
|
||||||
<div className="mt-1 rounded-md border border-border bg-accent/50 p-3 text-sm">
|
<div className="mt-1 rounded-md border border-border bg-accent/50 p-3 text-sm">
|
||||||
<MarkdownContent content={node.description} />
|
<MarkdownContent content={node.description} />
|
||||||
@@ -118,12 +117,10 @@ export function NodeFormAction({ node, onUpdate }: NodeFormActionProps) {
|
|||||||
|
|
||||||
{/* Commands */}
|
{/* Commands */}
|
||||||
<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">
|
||||||
Commands
|
Commands
|
||||||
|
<InfoTip text="PowerShell or CLI commands to execute" />
|
||||||
</label>
|
</label>
|
||||||
<p className="mb-2 text-xs text-muted-foreground">
|
|
||||||
PowerShell or CLI commands to execute
|
|
||||||
</p>
|
|
||||||
<DynamicArrayField
|
<DynamicArrayField
|
||||||
items={node.commands || []}
|
items={node.commands || []}
|
||||||
onAdd={handleAddCommand}
|
onAdd={handleAddCommand}
|
||||||
|
|||||||
Reference in New Issue
Block a user