Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei committed Nov 25, 2024
1 parent 7c22192 commit a450d91
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 44 deletions.
10 changes: 2 additions & 8 deletions apps/extension/src/routes/popup/approval/transaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ export const TransactionApproval = () => {
return (
<div className='flex h-screen flex-col'>
<div className='border-b border-gray-700 p-4'>
<h1
className=' bg-text-linear bg-clip-text pb-2 font-headline text-2xl font-bold text-transparent'
style={{ paddingBottom: '0px' }}
>
<h1 className=' bg-text-linear bg-clip-text pb-0 font-headline text-2xl font-bold text-transparent'>
Confirm Transaction
</h1>
</div>
Expand All @@ -70,10 +67,7 @@ export const TransactionApproval = () => {
)}
</div>

<div
className='border-t border-gray-700 p-4'
style={{ paddingBottom: '0px', paddingTop: '0px', paddingRight: '0px', paddingLeft: '0px' }}
>
<div className='border-t border-gray-700 p-0'>
<ApproveDeny approve={approve} deny={deny} wait={3} />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ViewTabs = ({
onValueChange={value => onValueChange(value as TransactionViewTab)}
>
<TabsList
className={cn('mx-auto mb-12 grid w-[100%] gap-4', {
className={cn('mx-auto mb-8 grid w-[100%] gap-4', {
'grid-cols-2': !showReceiverTransactionView,
'grid-cols-3': showReceiverTransactionView,
})}
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/components/ui/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ const TabsList = React.forwardRef<
<TabsPrimitive.List
ref={ref}
className={cn(
'inline-flex h-[52px] items-center justify-center rounded-lg bg-background px-2',
'inline-flex h-[52px] items-center justify-center rounded-lg bg-background px-2 mb-4',
className,
)}
style={{ marginBottom: '16px' }}
{...props}
/>
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ActionDetailsRow = ({
<span>{label}</span>
</span>
) : (
<span className='whitespace-nowrap break-keep'>{label}</span>
<span className='whitespace-nowrap break-keep text-base'>{label}</span>
)}

<Separator />
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/ui/tx/actions-views/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const SwapViewComponent = ({
)}

<ActionDetails.Row label='Swap Claim Fee'>
<div className='font-mono'>
<div className='text-base'>
<ValueViewComponent view={prepaidClaimFee} />
</div>
</ActionDetails.Row>
Expand Down
27 changes: 2 additions & 25 deletions packages/ui/components/ui/tx/actions-views/swap/one-way-swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,8 @@ export const OneWaySwap = ({ input, output }: { input: ValueView; output: ValueV
<div className='flex items-center justify-between'>
<ValueViewComponent view={input} />
<div className='relative mx-2 flex items-center justify-center'>
<div className='flex items-center justify-center w-16 h-6 rounded-full bg-gray-800 border border-gray-500'>
<div
className='flex items-center justify-center'
style={{
position: 'relative',
}}
>
<div
className='flex items-center'
style={{
width: '14px',
height: '2px',
backgroundColor: 'white',
}}
/>
<div
className='w-0 h-0 ml-[2px]'
style={{
borderTop: '4px solid transparent',
borderBottom: '4px solid transparent',
borderLeft: '6px solid white',
}}
/>
</div>
</div>
<div className='flex h-0.5 w-3.5 items-center bg-white' />
<div className='ml-[2px] size-0 border-y-4 border-l-[6px] border-y-transparent border-l-white' />
</div>
<div className='flex items-center justify-end'>
<ValueViewComponent view={output} showValue={!!outputAmount} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const ValueWithAddress = ({
label,
addressView,
}: {
/** What to display before the address. Typically a `ValueViewComponent`. */
children: ReactNode;
label: 'from' | 'to';
addressView?: AddressView;
Expand All @@ -22,8 +21,9 @@ export const ValueWithAddress = ({
{addressView && (
<div className='flex items-center gap-2 overflow-hidden'>
<span className='whitespace-nowrap font-mono text-sm italic text-foreground'>{label}</span>

<AddressViewComponent view={addressView} />
<div className='max-w-[150px] truncate'>
<AddressViewComponent view={addressView} />
</div>
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/components/ui/tx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export const TransactionViewComponent = ({
return (
<div className='flex flex-col gap-4'>
{txv.bodyView?.memoView?.memoView && <MemoViewComponent memo={txv.bodyView.memoView} />}
<ViewSection heading={<div style={{ paddingLeft: '3px' }}>Actions</div>}>
<ViewSection heading={<div className='pl-[3px]'>Actions</div>}>
{txv.bodyView?.actionViews.map((av, i) => (
<ActionViewComponent av={av} feeValueView={feeValueView} key={i} />
))}
</ViewSection>
<ViewSection heading={<div style={{ paddingLeft: '3px' }}>Parameters</div>}>
<ViewSection heading={<div className='pl-[3px]'>Parameters</div>}>
<ViewBox
label='Transaction Fee'
visibleContent={
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/ui/value/value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const ValueComponent = ({
</span>
)}
{showDenom && (
<span className='truncate font-mono text-xs text-muted-foreground max-w-[80px]'>
<span className='max-w-[80px] truncate font-mono text-xs text-muted-foreground'>
{symbol}
</span>
)}
Expand Down

0 comments on commit a450d91

Please sign in to comment.