Skip to content

Commit cf57926

Browse files
committed
improvement(scheduled-tasks): compose canonical modal separator, tidy imports
Replace the recurrence section's hand-rolled `h-px bg-[var(--border)]` divider with the canonical ChipModalSeparator (now exported from the chip-modal barrel) so the modal's hairline has a single source of truth. Also unify loading.tsx icon imports onto the @/components/emcn barrel.
1 parent 857c39d commit cf57926

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useRef } from 'react'
44
import { format } from 'date-fns'
5-
import { ChipDatePicker, ChipModalField, Switch } from '@/components/emcn'
5+
import { ChipDatePicker, ChipModalField, ChipModalSeparator, Switch } from '@/components/emcn'
66
import type {
77
Recurrence,
88
RecurrenceFrequency,
@@ -128,7 +128,7 @@ export function RecurrenceSection({ recurrence, onChange, launchDate }: Recurren
128128

129129
return (
130130
<div className='flex flex-col'>
131-
<div className='h-px bg-[var(--border)]' />
131+
<ChipModalSeparator />
132132
<div className='flex flex-col gap-4 px-2 pt-4 pb-4.5'>
133133
<ChipModalField type='custom' title='Recurring'>
134134
<Switch checked={isRecurring} onCheckedChange={handleRecurringToggle} />

apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client'
22

3-
import { Plus } from '@/components/emcn'
4-
import { Calendar } from '@/components/emcn/icons'
3+
import { Calendar, Plus } from '@/components/emcn'
54
import {
65
type ChromeActionSpec,
76
ResourceChromeFallback,

apps/sim/components/emcn/components/chip-modal/chip-modal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ import { Loader } from '@/components/emcn/icons'
6262
import { cn } from '@/lib/core/utils/cn'
6363
import { quickValidateEmail } from '@/lib/messaging/email/validation'
6464

65-
/** Shared inset separator used by the header and footer edges. */
66-
function ChipModalSeparator({ className }: { className?: string }) {
65+
/**
66+
* The modal's hairline divider — used by the header and footer edges, and
67+
* exported so body sections (e.g. a settings band below a prompt) can draw the
68+
* same line instead of re-deriving the `h-px bg-[var(--border)]` string.
69+
*/
70+
export function ChipModalSeparator({ className }: { className?: string }) {
6771
return <div className={cn('h-px bg-[var(--border)]', className)} />
6872
}
6973

apps/sim/components/emcn/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export {
5353
ChipModalPromptBody,
5454
type ChipModalPromptBodyProps,
5555
type ChipModalProps,
56+
ChipModalSeparator,
5657
type ChipModalTab,
5758
ChipModalTabs,
5859
type ChipModalTabsProps,

0 commit comments

Comments
 (0)