Skip to content

Commit

Permalink
feat: added symbol when staking/unstaking (#220)
Browse files Browse the repository at this point in the history
* feat: added symbol when staking/unstaking

* feat: added color for queue
  • Loading branch information
Freshenext authored Sep 17, 2024
1 parent 9624854 commit 0568e10
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/proposals/StatusColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const StatusByProposalState = {
Canceled: 'canceled',
Defeated: 'rejected',
Succeeded: 'success',
Queued: 'in-progress',
Queued: 'queue',
Expired: 'rejected',
Executed: 'success',
undefined: null,
Expand Down
13 changes: 12 additions & 1 deletion src/app/user/Stake/StakePreviewBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { StakePreviewBalanceProps } from '@/app/user/Stake/types'
import { Span } from '@/components/Typography'
import { toFixed } from '@/lib/utils'
import Image from 'next/image'

export const StakePreviewBalance = ({
topLeftText,
Expand All @@ -26,7 +27,17 @@ export const StakePreviewBalance = ({
<Span size="small" variant="light">
Balance: {toFixed(balance)}
</Span>
<div className="text-right mt-[8px]">{/* @TODO ICON {tokenSymbol} */}</div>
<div className="text-right mt-[8px] flex justify-end items-center">
{/* Maybe in the future make it dynamic - for now it's ok */}
<Image
src="/images/rif-logo.png"
alt="stRIF Logo"
width={0}
height={0}
className="mr-[8px] w-[16px] h-[16px]"
/>
<strong>{tokenSymbol}</strong>
</div>
</div>
</div>
)
1 change: 1 addition & 0 deletions src/components/Status/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const Status: FC<Props> = ({ severity = 'success', label, ...rest }) => {
'bg-st-info': severity === 'in-progress',
'bg-st-error': severity === 'rejected',
'bg-st-white': severity === 'canceled',
'bg-st-queue': severity === 'queue',
'text-black': severity === 'canceled',
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/Status/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type StatusSeverity = 'success' | 'rejected' | 'in-progress' | 'canceled'
export type StatusSeverity = 'success' | 'rejected' | 'in-progress' | 'canceled' | 'queue'
1 change: 1 addition & 0 deletions src/theme/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ html[data-theme='default'] {
--st-info: rgba(255, 153, 0, 1);
--st-error: rgba(242, 72, 34, 1);
--st-white: rgba(255, 255, 255, 1); /* This white is used in progress bar */
--st-queue: rgba(102, 94, 246, 1);

/* Font */
--font-open-sans: 'Open Sans';
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const config: Config = {
'st-info': 'var(--st-info)',
'st-error': 'var(--st-error)',
'st-white': 'var(--st-white)',
'st-queue': 'var(--st-queue)',
'text-light': 'var(--text-light)',
'disabled-primary': 'var(--disabled-primary)',
'disabled-secondary': 'var(--disabled-secondary)',
Expand Down

0 comments on commit 0568e10

Please sign in to comment.