-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from lum-network/feature/lum-802
[LUM-802] New prizes history
- Loading branch information
Showing
39 changed files
with
884 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@import 'src/styles/main'; | ||
|
||
.tag { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
color: $color-white; | ||
font-size: 12px; | ||
font-style: normal; | ||
font-weight: 400; | ||
padding: 7px 12px; | ||
|
||
&.success { | ||
background-color: $color-success; | ||
} | ||
&.outline { | ||
background-color: transparent; | ||
border: 2px solid $color-primary; | ||
color: $color-primary; | ||
} | ||
&.info { | ||
background-color: $color-grey; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
|
||
import { TagsConstants } from 'constant'; | ||
import { I18n } from 'utils'; | ||
import Assets from 'assets'; | ||
import { Tooltip } from '../index'; | ||
|
||
import './Tag.scss'; | ||
|
||
interface IProps { | ||
type: TagsConstants.Types; | ||
} | ||
|
||
const Tag = ({ type }: IProps) => { | ||
let classNameType = ''; | ||
let wordType = ''; | ||
|
||
switch (type) { | ||
case TagsConstants.Types.CLAIMED: | ||
classNameType = 'success'; | ||
wordType = I18n.t('tags.claimed'); | ||
break; | ||
case TagsConstants.Types.EXPIRED: | ||
classNameType = 'info'; | ||
wordType = I18n.t('tags.expired'); | ||
break; | ||
case TagsConstants.Types.UNCLAIMED: | ||
classNameType = 'outline'; | ||
wordType = I18n.t('tags.unclaimed'); | ||
break; | ||
} | ||
|
||
return ( | ||
<div className={`tag rounded-pill ${classNameType}`}> | ||
{wordType} | ||
{type === TagsConstants.Types.EXPIRED && ( | ||
<span data-tooltip-id='expired-tag' data-tooltip-html={I18n.t('tags.expiredTooltip')} className='ms-2 mb-1'> | ||
<img src={Assets.images.infoWhite} alt='info' width={15} height={15} /> | ||
<Tooltip id='expired-tag' /> | ||
</span> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Tag; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
.app-tooltip { | ||
font-size: 14px; | ||
color: $color-black; | ||
a { | ||
|
||
a { | ||
color: $color-black; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from 'react'; | ||
import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
import { PlacesType, Tooltip as ReactTooltip } from 'react-tooltip'; | ||
|
||
import './Tooltip.scss'; | ||
|
||
const Tooltip = ({ id, delay }: { id: string; delay?: number }) => { | ||
return <ReactTooltip id={id} clickable className='tooltip-light app-tooltip width-400' variant='light' delayHide={delay} />; | ||
const Tooltip = ({ id, delay, place }: { id: string; delay?: number; place?: PlacesType }) => { | ||
return <ReactTooltip id={id} clickable className='tooltip-light app-tooltip width-400' place={place} variant='light' delayHide={delay} />; | ||
}; | ||
|
||
export default Tooltip; |
27 changes: 27 additions & 0 deletions
27
src/components/TransactionBatchProgress/TransactionBatchProgress.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@import 'src/styles/main'; | ||
|
||
.progress-card { | ||
color: $color-white; | ||
border: 2px solid $color-primary; | ||
background-color: #5634de4d !important; | ||
padding: 11px 16.5px; | ||
position: relative; | ||
overflow: hidden; | ||
box-sizing: border-box; | ||
|
||
.batch-card-info-icon { | ||
filter: brightness(0) invert(1); | ||
} | ||
|
||
& > .card-progress { | ||
position: absolute; | ||
top: -2px; | ||
left: -2px; | ||
bottom: -2px; | ||
border: 2px solid $color-primary; | ||
border-radius: 12px; | ||
background-color: $color-primary; | ||
|
||
transition: width 0.3s ease-out; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/components/TransactionBatchProgress/TransactionBatchProgress.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
|
||
import Assets from 'assets'; | ||
import { I18n } from 'utils'; | ||
|
||
import Card from '../Card/Card'; | ||
import Tooltip from '../Tooltip/Tooltip'; | ||
|
||
import './TransactionBatchProgress.scss'; | ||
|
||
interface Props { | ||
batch: number; | ||
batchTotal: number; | ||
className?: string; | ||
} | ||
|
||
const TransactionBatchProgress = ({ batch, batchTotal, className }: Props) => { | ||
return ( | ||
<Card flat withoutPadding className={`d-flex flex-row justify-content-center progress-card ${className}`}> | ||
<div className='card-progress' style={{ width: `calc(${(batch / batchTotal) * 100}% + 4px)` }} /> | ||
<span data-tooltip-id='batch-tooltip' data-tooltip-html={I18n.t('common.batchTooltip')} className='me-2'> | ||
<img className='batch-card-info-icon' src={Assets.images.info} alt='info' /> | ||
<Tooltip id='batch-tooltip' delay={2000} /> | ||
</span> | ||
<div style={{ zIndex: 2 }}>{I18n.t('common.batchProgress', { count: batch, total: batchTotal })}</div> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default TransactionBatchProgress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum PrizeState { | ||
CLAIMED = 'claimed', | ||
EXPIRED = 'expired', | ||
PENDING = 'pending', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export enum Types { | ||
CLAIMED = 'claimed', | ||
UNCLAIMED = 'unclaimed', | ||
EXPIRED = 'expired', | ||
SUCCESS = 'success', | ||
UNBONDING = 'unbonding', | ||
DEPOSIT = 'deposit', | ||
ERROR = 'error', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.