Skip to content

Commit

Permalink
Fix overflowing asset name in the market grid
Browse files Browse the repository at this point in the history
  • Loading branch information
muliswilliam committed Sep 19, 2023
1 parent cc69cb1 commit 842a39d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@

import * as React from 'react'

import { StyledWrapper, NameAndSymbolWrapper, AssetName, AssetSymbol, AssetIcon } from './style'
import {
StyledWrapper,
NameAndSymbolWrapper,
AssetName,
AssetSymbol,
AssetIcon
} from './style'

export interface Props {
symbol: string
Expand All @@ -14,15 +20,11 @@ export interface Props {
}

export const AssetNameAndIcon = (props: Props) => {
const {
assetLogo,
assetName,
symbol
} = props
const { assetLogo, assetName, symbol } = props

return (
<StyledWrapper>
<AssetIcon src={assetLogo} loading="lazy" />
<AssetIcon src={assetLogo} loading='lazy' />
<NameAndSymbolWrapper>
<AssetName>{assetName}</AssetName>
<AssetSymbol>{symbol}</AssetSymbol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const NameAndSymbolWrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
height: 100%;
padding: 1px 0;
`
Expand All @@ -34,6 +35,11 @@ export const AssetName = styled.span`
font-style: normal;
font-weight: 600;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 160px;
text-align: left;
`

export const AssetSymbol = styled.span`
Expand All @@ -44,4 +50,5 @@ export const AssetSymbol = styled.span`
font-weight: 500;
line-height: 18px;
text-transform: uppercase;
text-align: left;
`

0 comments on commit 842a39d

Please sign in to comment.