-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Illustrations]: Add new svgs for chains and refactor (#876)
* chore(Illustrations): refactor WIP * chore(Illustration): replace chain type with common type * chore(Illustration): updating icons WIP * chore: add plop generator for chain logo * chore(Plop): fix minor issues and add comments * fix: plop generator * feat: update svg with new designs * fix: plop file generato name * docs: add step to create new components * add changeset file * chore: fix svg attribute
- Loading branch information
Showing
26 changed files
with
439 additions
and
611 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@web3uikit/core': patch | ||
--- | ||
|
||
Add new svg for illustration and plop generator |
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,54 @@ | ||
export const chainLogoData = { | ||
arbitrum: { | ||
name: 'arbitrum', | ||
color: '#003470', | ||
}, | ||
fantom: { | ||
name: 'fantom', | ||
color: '#0F7FFF', | ||
}, | ||
avalanche: { | ||
name: 'avalanche', | ||
color: '#DE0000', | ||
}, | ||
polygon: { | ||
name: 'polygon', | ||
color: '#9B22FF', | ||
}, | ||
binance: { | ||
name: 'binance', | ||
color: '#EBBB00', | ||
}, | ||
ethereum: { | ||
name: 'ethereum', | ||
color: '#396993', | ||
}, | ||
cronos: { | ||
name: 'cronos', | ||
color: '#041836', | ||
}, | ||
coinbase: { | ||
name: 'coinbase', | ||
color: '#333dfb', | ||
}, | ||
ronin: { | ||
name: 'ronin', | ||
color: '#019EC9', | ||
}, | ||
optimism: { | ||
name: 'optimism', | ||
color: '#E95557', | ||
}, | ||
/* PLOP_INJECT_CHAIN */ | ||
} as const; | ||
|
||
const logoWalletColors = { | ||
cryptoweb: | ||
'linear-gradient(113.54deg, rgba(45, 91, 104, 0.531738) 14.91%, rgba(0, 4, 48, 0.6) 42.57%, rgba(45, 91, 104, 0.336) 45.98%, rgba(0, 4, 48, 0.03) 55.76%), linear-gradient(160.75deg, #000430 41.37%, #223F47 98.29%), linear-gradient(113.54deg, rgba(117, 183, 251, 0.531738) 14.91%, rgba(10, 41, 255, 0.6) 42.57%, rgba(25, 105, 255, 0.336) 45.98%, rgba(25, 105, 255, 0.03) 55.76%), linear-gradient(160.75deg, #071AFF 41.37%, #45D4FF 98.29%)', | ||
}; | ||
|
||
export type TChainNames = keyof typeof chainLogoData; | ||
|
||
export type TWalletNames = keyof typeof logoWalletColors; | ||
|
||
export type TLogoNames = TChainNames | TWalletNames; |
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import styled, { css } from 'styled-components'; | ||
import { resetCSS } from '@web3uikit/styles'; | ||
import type { chainType, CryptoLogoProps, sizeType } from './types'; | ||
import bgConfig from './bgConfig'; | ||
import { chainType, CryptoLogoProps, sizeType } from './types'; | ||
import { chainLogoData } from '../../interfaces/logo'; | ||
|
||
const getBackground = (chain: chainType) => bgConfig[chain]; | ||
const getBackground = (chain: chainType) => chainLogoData[chain].color; | ||
|
||
const getSize = (size?: sizeType) => css` | ||
height: ${size}; | ||
width: ${size}; | ||
height: ${size}; | ||
width: ${size}; | ||
`; | ||
|
||
const DivStyledCryptoLogo = styled.div<CryptoLogoProps>` | ||
${resetCSS}; | ||
${(props) => getSize(props.size)} | ||
align-items: center; | ||
border-radius: 100%; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
overflow: hidden; | ||
position: relative; | ||
background: ${(props) => props?.bgColor || getBackground(props.chain)}; | ||
${resetCSS}; | ||
${(props) => getSize(props.size)} | ||
align-items: center; | ||
border-radius: 100%; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
overflow: hidden; | ||
position: relative; | ||
background: ${(props) => props?.bgColor || getBackground(props.chain)}; | ||
`; | ||
|
||
export default { DivStyledCryptoLogo }; |
This file was deleted.
Oops, something went wrong.
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.