Skip to content

Commit

Permalink
[Issue - 2014] Update responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
lw-cdm committed Oct 24, 2023
1 parent 8f4ac86 commit 4cc084b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
11 changes: 5 additions & 6 deletions packages/extension-koni-ui/src/Popup/MissionPool/MissionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function Component (props: Props): React.ReactElement<Props> {
>
<div
className='__compact-item-background'
style={{ backgroundImage: data.logo ? `url("${data.logo}")` : undefined }}
style={{ backgroundImage: data.backdrop_image ? `url("${data.backdrop_image}")` : undefined }}
></div>

<div className={'__compact-item-inner'}>
Expand Down Expand Up @@ -393,7 +393,7 @@ const MissionItem = styled(Component)<Props>(({ theme: { token } }: Props) => {
'.__compact-item-background': {
height: '100%',
width: 32,
backgroundPosition: 'center',
backgroundPosition: 'left',
backgroundSize: 'cover',
position: 'absolute',
top: 0,
Expand Down Expand Up @@ -423,7 +423,6 @@ const MissionItem = styled(Component)<Props>(({ theme: { token } }: Props) => {
},

'.__compact-item-content-part-2': {

overflow: 'hidden'
},

Expand All @@ -435,7 +434,8 @@ const MissionItem = styled(Component)<Props>(({ theme: { token } }: Props) => {
textOverflow: 'ellipsis',
'white-space': 'nowrap',
fontWeight: token.headingFontWeight,
flex: 1
flex: 1,
minWidth: 80
},

'.__compact-item-tags': {
Expand Down Expand Up @@ -467,8 +467,7 @@ const MissionItem = styled(Component)<Props>(({ theme: { token } }: Props) => {
fontWeight: token.headingFontWeight,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
maxWidth: 100
whiteSpace: 'nowrap'
}
}
};
Expand Down
15 changes: 5 additions & 10 deletions packages/extension-koni-ui/src/Popup/MissionPool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,24 +291,19 @@ const MissionPool = styled(Component)<Props>(({ theme: { token } }: Props) => {
marginRight: -16,
paddingLeft: 16,
paddingRight: 16
},

'.__tool-area': {
'.search-container': {
order: 1
},

'.filter-tabs-container': {
order: 2
}
}
},

'@media (max-width: 767px)': {
'.__tool-area': {
gap: token.sizeXS,

'.filter-tabs-container': {
order: 2
},

'.search-container': {
order: 1,
minWidth: '100%',
maxWidth: 'none'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ const Component: React.FC<Props> = (props: Props) => {
temp.label = !compact ? text : undefined;
temp.tooltip = compact ? text : undefined;
temp.onClick = onClickButton(onClickStakeBtn, getEarnExtrinsicType(slug));
temp.label = yieldPoolInfo.type === YieldPoolType.LENDING ? t('Supply now') : t('Stake now');
break;
}

Expand Down
11 changes: 11 additions & 0 deletions packages/extension-koni-ui/src/components/Layout/base/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ const Base = styled(Component)<LayoutBaseProps>(({ theme: { token } }: LayoutBas
}
}
}
},

'@media (max-width: 600px)': {
'.ant-sw-tab-bar-item': {
paddingBottom: token.sizeXS,
paddingTop: token.sizeXS
},

'.ant-sw-tab-bar-item-label': {
display: 'none'
}
}
}));

Expand Down

0 comments on commit 4cc084b

Please sign in to comment.