Skip to content

Commit f9867c7

Browse files
authored
improvement(enrichments): align enrichments sidebar with design system (#4801)
* improvement(enrichments): align enrichments sidebar with design system * fix(enrichments): consistent close button pattern and fix url link hover
1 parent e1e773f commit f9867c7

4 files changed

Lines changed: 16 additions & 21 deletions

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichment-config.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { useState } from 'react'
44
import { toError } from '@sim/utils/errors'
55
import { generateId } from '@sim/utils/id'
6-
import { X } from 'lucide-react'
76
import {
87
Badge,
98
Button,
@@ -15,7 +14,7 @@ import {
1514
Switch,
1615
toast,
1716
} from '@/components/emcn'
18-
import { ArrowLeft } from '@/components/emcn/icons'
17+
import { ArrowLeft, X } from '@/components/emcn/icons'
1918
import type { AddWorkflowGroupBodyInput } from '@/lib/api/contracts/tables'
2019
import { cn } from '@/lib/core/utils/cn'
2120
import type { ColumnDefinition, WorkflowGroup, WorkflowGroupOutput } from '@/lib/table'

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichments-sidebar.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
'use client'
22

33
import { useState } from 'react'
4-
import { X } from 'lucide-react'
5-
import { Button, Input } from '@/components/emcn'
6-
import { Search } from '@/components/emcn/icons'
4+
import { Input } from '@/components/emcn'
5+
import { Search, X } from '@/components/emcn/icons'
76
import { cn } from '@/lib/core/utils/cn'
87
import type { ColumnDefinition, WorkflowGroup } from '@/lib/table'
98
import { ALL_ENRICHMENTS } from '@/enrichments'
@@ -75,15 +74,14 @@ function EnrichmentsSidebarBody({
7574
<div className='flex h-full flex-col'>
7675
<div className='flex items-center justify-between border-[var(--border)] border-b px-3 py-[8.5px]'>
7776
<h2 className='font-medium text-[var(--text-primary)] text-small'>Enrichment</h2>
78-
<Button
79-
variant='ghost'
80-
size='sm'
77+
<button
78+
type='button'
8179
onClick={onClose}
82-
className='!p-1 size-7 flex-none'
80+
className='flex size-7 flex-none items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover-hover:bg-[var(--surface-hover)] hover-hover:text-[var(--text-primary)]'
8381
aria-label='Close'
8482
>
8583
<X className='size-[14px]' />
86-
</Button>
84+
</button>
8785
</div>
8886
<div className='flex flex-1 items-center justify-center px-6 text-center'>
8987
<p className='text-[var(--text-tertiary)] text-small'>
@@ -121,15 +119,14 @@ function EnrichmentsSidebarBody({
121119
<div className='flex h-full flex-col'>
122120
<div className='flex items-center justify-between border-[var(--border)] border-b px-3 py-[8.5px]'>
123121
<h2 className='font-medium text-[var(--text-primary)] text-small'>Enrichments</h2>
124-
<Button
125-
variant='ghost'
126-
size='sm'
122+
<button
123+
type='button'
127124
onClick={onClose}
128-
className='!p-1 size-7 flex-none'
125+
className='flex size-7 flex-none items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover-hover:bg-[var(--surface-hover)] hover-hover:text-[var(--text-primary)]'
129126
aria-label='Close'
130127
>
131128
<X className='size-[14px]' />
132-
</Button>
129+
</button>
133130
</div>
134131

135132
<div className='px-2 pt-3'>
@@ -155,11 +152,10 @@ function EnrichmentsSidebarBody({
155152
const Icon = enrichment.icon
156153
return (
157154
<li key={enrichment.id}>
158-
<Button
159-
variant='ghost'
155+
<button
160156
type='button'
161157
onClick={() => setSelected(enrichment)}
162-
className='flex w-full items-start justify-start gap-2.5 rounded-md px-2 py-2 text-left hover-hover:bg-[var(--surface-3)]'
158+
className='flex w-full items-start gap-2.5 rounded-md px-2 py-2 text-left transition-colors hover-hover:bg-[var(--surface-hover)]'
163159
>
164160
<Icon className='mt-0.5 size-[14px] flex-none text-[var(--text-icon)]' />
165161
<span className='flex min-w-0 flex-col gap-0.5'>
@@ -170,7 +166,7 @@ function EnrichmentsSidebarBody({
170166
{enrichment.description}
171167
</span>
172168
</span>
173-
</Button>
169+
</button>
174170
</li>
175171
)
176172
})}

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export function CellRender({ kind, isEditing }: CellRenderProps): React.ReactEle
320320
target='_blank'
321321
rel='noopener noreferrer'
322322
className={cn(
323-
'min-w-0 overflow-clip text-ellipsis text-[var(--text-primary)] underline underline-offset-2 hover:opacity-70',
323+
'min-w-0 overflow-clip text-ellipsis text-[var(--text-primary)] underline underline-offset-2 transition-colors hover-hover:text-[var(--text-secondary)]',
324324
isEditing && 'pointer-events-none'
325325
)}
326326
onClick={(e) => e.stopPropagation()}

apps/sim/enrichments/work-email/work-email.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { filterUndefined } from '@sim/utils/object'
2-
import { Mail } from 'lucide-react'
2+
import { Mail } from '@/components/emcn/icons'
33
import { normalizeDomain, splitName, str, toolProvider } from '@/enrichments/providers'
44
import type { EnrichmentConfig } from '@/enrichments/types'
55

0 commit comments

Comments
 (0)