Skip to content

Commit

Permalink
[web] Better mobile responsiveness for DetailModal & Add support fo…
Browse files Browse the repository at this point in the history
…r Osmosis Pool IDs
  • Loading branch information
junhoyeo committed Feb 13, 2023
1 parent 12558ad commit 8bbedb1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
22 changes: 19 additions & 3 deletions apps/web/src/dashboard/components/DeFiStakingItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ export const DeFiStakingItem: React.FC<DeFiStakingItemProps> = ({
<AccountItem>
<span className="field">
{/* FIXME: Exception for Osmosis */}
{/* {protocol.type === OsmosisDeFiType.OSMOSIS_GAMM_LP
{typeof info.name !== 'string' && info.name.en.endsWith('Osmosis LPs')
? t('Pool ID')
: t('Rep Contract')} */}
{t('Rep Contract')}
: t('Rep Contract')}
</span>
<span >
<InlineBadge>{shortenAddress(protocol.ind)}</InlineBadge>
Expand Down Expand Up @@ -268,6 +267,11 @@ const Header = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
@media (max-width: ${Breakpoints.Mobile}px) {
flex-direction: column;
align-items: flex-start;
}
`;
const HeaderTitle = styled.div`
display: flex;
Expand All @@ -283,6 +287,12 @@ const Name = styled.h5`
font-size: 18px;
font-weight: 600;
@media (max-width: ${Breakpoints.Mobile}px) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:lang(ko) {
letter-spacing: -0.8px;
}
Expand Down Expand Up @@ -351,6 +361,12 @@ const AccountInfo = styled.div`
display: flex;
align-items: center;
gap: 16px;
@media (max-width: ${Breakpoints.Mobile}px) {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
`;
const AccountItem = styled.div`
display: flex;
Expand Down
9 changes: 6 additions & 3 deletions apps/web/src/dashboard/components/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const DetailModal: React.FC<Props> = ({

return (
<OverlayWrapper
className="wrapper"
visible={isVisible}
onDismiss={onDismiss}
transition={{ ease: 'linear' }}
Expand Down Expand Up @@ -330,15 +331,17 @@ export const DetailModal: React.FC<Props> = ({
export default DetailModal;

const OverlayWrapper = styled(Modal)`
.modal-container {
margin-top: 52px;
&.wrapper {
z-index: 90;
}
.modal-container {
padding: 16px;
max-width: 800px;
height: fit-content;
width: 95vw;
max-height: calc(100vh - 64px - 84px);
max-height: 85vh;
overflow: scroll;
display: flex;
Expand Down

0 comments on commit 8bbedb1

Please sign in to comment.