- {block.type !== 'note' && (
-
-
-
- )}
+ {block.type !== 'note' &&
}
{block.name || blockConfig.name}
diff --git a/apps/sim/blocks/block-tile.tsx b/apps/sim/blocks/block-tile.tsx
index c43c77ac94b..a87523d7944 100644
--- a/apps/sim/blocks/block-tile.tsx
+++ b/apps/sim/blocks/block-tile.tsx
@@ -6,12 +6,23 @@ import { WorkflowTypeIcon } from '@sim/workflow-renderer'
import { getBlockTileColor, getBlockTileIcon, hasBlockAccent } from '@/blocks/accent'
import { getTileIconColorClass } from '@/blocks/icon-color'
-/** Slot sizes the tile ships in: the canvas 16px chip, or 14px for dense rows. */
+/**
+ * Slot sizes the tile ships in: the 18px detail header, the canvas 16px chip,
+ * or 14px for dense rows.
+ */
const TILE_SIZE_CLASS = {
+ lg: 'size-[18px]',
md: 'size-[16px]',
sm: 'size-[14px]',
} as const
+/** Icon drawn inside each slot. Only the header tile takes the larger glyph. */
+const TILE_ICON_SIZE_CLASS = {
+ lg: 'size-[12px]',
+ md: 'size-[10px]',
+ sm: 'size-[10px]',
+} as const
+
export interface BlockTileProps extends Omit
, 'children' | 'style'> {
/**
* Block the tile represents; decides whether it takes the canvas role accent.
@@ -54,9 +65,18 @@ export function BlockTile({
}: BlockTileProps) {
const Icon = icon ?? (blockType ? getBlockTileIcon(blockType) : undefined)
const sizeClass = cn(TILE_SIZE_CLASS[size], className)
+ const iconSizeClass = TILE_ICON_SIZE_CLASS[size]
if (blockType && Icon && hasBlockAccent(blockType)) {
- return
+ return (
+
+ )
}
const fill = bgColor ?? (blockType ? getBlockTileColor(blockType) : undefined)
@@ -70,7 +90,8 @@ export function BlockTile({
{Icon ? (
diff --git a/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx b/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx
index add33886127..de8e59df2b6 100644
--- a/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx
+++ b/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx
@@ -183,10 +183,18 @@ export const getWorkflowTypeAccent = (type: string) =>
export interface WorkflowTypeIconProps extends Omit, 'children'> {
type: string
Icon: ComponentType<{ className?: string }>
+ /** Overrides the glyph size when the chip is rendered at a non-default slot. */
+ iconClassName?: string
}
/** Shared compact core-block icon used by workflow discovery surfaces. */
-export function WorkflowTypeIcon({ type, Icon, className, ...props }: WorkflowTypeIconProps) {
+export function WorkflowTypeIcon({
+ type,
+ Icon,
+ className,
+ iconClassName,
+ ...props
+}: WorkflowTypeIconProps) {
const typeAccent = getWorkflowTypeAccent(type)
return (
@@ -197,7 +205,12 @@ export function WorkflowTypeIcon({ type, Icon, className, ...props }: WorkflowTy
data-workflow-type-icon={type}
{...props}
>
-
+
)
}