-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nfts): add refresh to asset page
- Loading branch information
plondon
committed
May 7, 2022
1 parent
63867cf
commit 38a6480
Showing
4 changed files
with
69 additions
and
22 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
33 changes: 33 additions & 0 deletions
33
packages/blockchain-wallet-v4-frontend/src/scenes/Nfts/components/NftRefreshIcon.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,33 @@ | ||
import React from 'react' | ||
import { Icon } from '@blockchain-com/constellation' | ||
import { IconRefresh } from '@blockchain-com/icons' | ||
import styled from 'styled-components' | ||
|
||
export const StyledIconRefresh = styled(IconRefresh)` | ||
@keyframes spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
&.active { | ||
animation: spin 0.5s linear 1; | ||
} | ||
` | ||
|
||
const NftRefreshIcon = (props: Props) => { | ||
return ( | ||
<Icon label='refresh' size={props.size} color='blue600'> | ||
<StyledIconRefresh className={props.isActive ? 'active' : ''} /> | ||
</Icon> | ||
) | ||
} | ||
|
||
type Props = { | ||
isActive: boolean | ||
size: 'sm' | 'md' | 'lg' | ||
} | ||
|
||
export default NftRefreshIcon |
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
1 change: 1 addition & 0 deletions
1
packages/blockchain-wallet-v4-frontend/src/scenes/Nfts/components/index.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