mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
42 lines
852 B
TypeScript
42 lines
852 B
TypeScript
import { ConditionalIcon } from '@/components/icons'
|
|
import { BlockConfig } from '../types/block'
|
|
|
|
export const ConditionalBlock: BlockConfig = {
|
|
type: 'conditional',
|
|
toolbar: {
|
|
title: 'Conditional',
|
|
description: 'Add branching logic',
|
|
bgColor: '#FF972F',
|
|
icon: ConditionalIcon,
|
|
category: 'basic',
|
|
},
|
|
workflow: {
|
|
inputs: {
|
|
condition: 'boolean',
|
|
value: 'any',
|
|
},
|
|
outputs: {
|
|
result: 'any',
|
|
path: 'string',
|
|
},
|
|
subBlocks: [
|
|
{
|
|
title: 'Condition Type',
|
|
type: 'dropdown',
|
|
layout: 'full',
|
|
options: [
|
|
'Equals',
|
|
'Contains',
|
|
'Greater Than',
|
|
'Less Than',
|
|
'Regular Expression',
|
|
],
|
|
},
|
|
{
|
|
title: 'Value',
|
|
type: 'short-input',
|
|
layout: 'full',
|
|
},
|
|
],
|
|
},
|
|
} |