Open workflow
@@ -480,11 +472,10 @@ export function EmbeddedWorkflowActions({ workspaceId, workflowId }: EmbeddedWor{isExecuting ? 'Stop' : 'Run workflow'}
@@ -520,14 +511,13 @@ export function EmbeddedKnowledgeBaseActions({ return (Open knowledge base
@@ -562,14 +552,9 @@ function EmbeddedTableActions({ workspaceId, tableId }: EmbeddedTableActionsProp <>Open table
@@ -577,14 +562,13 @@ function EmbeddedTableActions({ workspaceId, tableId }: EmbeddedTableActionsPropExport CSV
@@ -639,14 +623,9 @@ function EmbeddedFileActions({ <>Open in files
@@ -654,15 +633,14 @@ function EmbeddedFileActions({Download
@@ -896,14 +874,9 @@ export function EmbeddedLogActions({ workspaceId, logId }: EmbeddedLogActionsPro return (Open in logs
diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts index 43931efbff9..8507e6beafb 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts @@ -1,10 +1,3 @@ -/** - * Icon-only controls in the resource header — add, preview mode, the per-resource - * actions — fill the tab strip's control band, so they match the strip's own - * new-tab button and the panel's collapse toggle and the header reads as one row. - */ -export const RESOURCE_TAB_ICON_BUTTON_CLASS = 'size-[var(--tab-strip-band,30px)] shrink-0 p-0' - export const RESOURCE_TAB_ICON_CLASS = 'size-[16px] text-[var(--text-icon)]' /** Shared geometry for the resource header and controls positioned over it. */ diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx index 71f94b3b37b..e3f73406f8c 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx @@ -10,9 +10,9 @@ import { useState, } from 'react' import { - Button, cn, TabStrip, + TabStripAction, type TabStripDragContext, type TabStripItem, type TabStripSelectionSource, @@ -41,7 +41,6 @@ import { useTerminalCloseConfirmation } from '@/app/workspace/[workspaceId]/home import { getResourceConfig } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry' import { RESOURCE_HEADER_CLASSES, - RESOURCE_TAB_ICON_BUTTON_CLASS, RESOURCE_TAB_ICON_CLASS, resourceTabWidthClass, } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls' @@ -545,14 +544,13 @@ export function ResourceTabs({ previewMode && onCyclePreviewMode ? ({PREVIEW_MODE_LABELS[previewMode]}
diff --git a/packages/emcn/src/components/index.ts b/packages/emcn/src/components/index.ts index c7c2204968a..bd96f788378 100644 --- a/packages/emcn/src/components/index.ts +++ b/packages/emcn/src/components/index.ts @@ -239,6 +239,7 @@ export { tabStripItemSelector, tabStripWheelPosition, } from './tab-strip/tab-strip' +export { TabStripAction, type TabStripActionProps } from './tab-strip/tab-strip-action' export { Table, TableBody, diff --git a/packages/emcn/src/components/tab-strip/tab-strip-action.tsx b/packages/emcn/src/components/tab-strip/tab-strip-action.tsx new file mode 100644 index 00000000000..5026fe44fcb --- /dev/null +++ b/packages/emcn/src/components/tab-strip/tab-strip-action.tsx @@ -0,0 +1,29 @@ +import { forwardRef } from 'react' +import { cn } from '../../lib/cn' +import { Button, type ButtonProps } from '../button/button' + +export interface TabStripActionProps + extends Omit