refactor(entry-node): remove showIndicator prop and related logic for cleaner component structure

This commit is contained in:
zhsama 2025-10-21 19:53:29 +08:00
parent f4acc78f66
commit c90df5c12c
2 changed files with 1 additions and 7 deletions

View File

@ -8,7 +8,6 @@ type EntryNodeContainerProps = {
children: ReactNode
status?: EntryNodeStatus
customLabel?: string
showIndicator?: boolean
nodeType?: 'start' | 'trigger'
}
@ -16,7 +15,6 @@ const EntryNodeContainer: FC<EntryNodeContainerProps> = ({
children,
status = 'enabled',
customLabel,
showIndicator = true,
nodeType = 'trigger',
}) => {
const { t } = useTranslation()
@ -36,10 +34,7 @@ const EntryNodeContainer: FC<EntryNodeContainerProps> = ({
return (
<div className="w-fit min-w-[242px] rounded-2xl bg-workflow-block-wrapper-bg-1 px-0 pb-0 pt-0.5">
<div className="mb-0.5 flex items-center px-1.5 pt-0.5">
{showIndicator && (
<div className={`ml-0.5 mr-0.5 h-1.5 w-1.5 rounded-sm border ${statusConfig.dotClasses}`} />
)}
<span className={`text-2xs font-semibold uppercase text-text-tertiary ${!showIndicator ? 'ml-1.5' : ''}`}>
<span className="text-2xs font-semibold uppercase text-text-tertiary">
{statusConfig.label}
</span>
</div>

View File

@ -363,7 +363,6 @@ const BaseNode: FC<BaseNodeProps> = ({
return isEntryNode ? (
<EntryNodeContainer
status={nodeStatus}
showIndicator={!isStartNode}
nodeType={isStartNode ? 'start' : 'trigger'}
>
{nodeContent}