Skip to content

Commit 098f1f5

Browse files
committed
improvement(special-tags): improved billing ui
1 parent 288aa08 commit 098f1f5

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx

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

33
import { createElement } from 'react'
44
import { useParams } from 'next/navigation'
5-
import { ArrowRight } from '@/components/emcn'
5+
import { AlertTriangle, ArrowRight } from '@/components/emcn'
66
import { cn } from '@/lib/core/utils/cn'
77
import { OAUTH_PROVIDERS } from '@/lib/oauth/oauth'
88

@@ -464,36 +464,17 @@ function UsageUpgradeDisplay({ data }: { data: UsageUpgradeTagData }) {
464464
const buttonLabel = data.action === 'upgrade_plan' ? 'Upgrade Plan' : 'Increase Limit'
465465

466466
return (
467-
<div className='animate-stream-fade-in rounded-xl border border-amber-300/40 bg-amber-50/50 px-4 py-3 dark:border-amber-500/20 dark:bg-amber-950/20'>
468-
<div className='flex items-center gap-2'>
469-
<svg
470-
className='h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400'
471-
viewBox='0 0 16 16'
472-
fill='none'
473-
xmlns='http://www.w3.org/2000/svg'
474-
>
475-
<path
476-
d='M8 1.5L1 14h14L8 1.5z'
477-
stroke='currentColor'
478-
strokeWidth='1.3'
479-
strokeLinejoin='round'
480-
/>
481-
<path d='M8 6.5v3' stroke='currentColor' strokeWidth='1.3' strokeLinecap='round' />
482-
<circle cx='8' cy='11.5' r='0.75' fill='currentColor' />
483-
</svg>
484-
<span className='font-[500] text-[14px] text-amber-800 leading-5 dark:text-amber-300'>
485-
Usage Limit Reached
486-
</span>
487-
</div>
488-
<p className='mt-1.5 text-[13px] text-amber-700/90 leading-[20px] dark:text-amber-400/80'>
467+
<div className='animate-stream-fade-in space-y-1'>
468+
<span className='font-base text-[13px] text-[var(--text-secondary)] italic leading-[20px]'>
489469
{data.message}
490-
</p>
470+
</span>
491471
<a
492472
href={settingsPath}
493-
className='mt-2 inline-flex items-center gap-1 font-[500] text-[13px] text-amber-700 underline decoration-dashed underline-offset-2 transition-colors hover:text-amber-900 dark:text-amber-300 dark:hover:text-amber-200'
473+
className='flex items-center gap-[8px] rounded-lg border border-[var(--divider)] px-3 py-2.5 transition-colors hover:bg-[var(--surface-5)]'
494474
>
495-
{buttonLabel}
496-
<ArrowRight className='h-3 w-3' />
475+
<AlertTriangle className='h-[16px] w-[16px] shrink-0 text-[var(--text-icon)]' />
476+
<span className='flex-1 font-base text-[14px] text-[var(--text-body)]'>{buttonLabel}</span>
477+
<ArrowRight className='h-[16px] w-[16px] shrink-0 text-[var(--text-icon)]' />
497478
</a>
498479
</div>
499480
)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { SVGProps } from 'react'
2+
3+
/**
4+
* AlertTriangle icon component - warning triangle with exclamation mark
5+
* @param props - SVG properties including className, fill, etc.
6+
*/
7+
export function AlertTriangle(props: SVGProps<SVGSVGElement>) {
8+
return (
9+
<svg
10+
width='24'
11+
height='24'
12+
viewBox='0 0 24 24'
13+
fill='none'
14+
stroke='currentColor'
15+
strokeWidth='1.75'
16+
strokeLinecap='round'
17+
strokeLinejoin='round'
18+
xmlns='http://www.w3.org/2000/svg'
19+
{...props}
20+
>
21+
<path d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z' />
22+
<line x1='12' y1='9' x2='12' y2='13' />
23+
<line x1='12' y1='17' x2='12.01' y2='17' />
24+
</svg>
25+
)
26+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export { AlertTriangle } from './alert-triangle'
12
export { ArrowDown } from './arrow-down'
23
export { ArrowLeft } from './arrow-left'
34
export { ArrowRight } from './arrow-right'

0 commit comments

Comments
 (0)