Skip to content

Commit

Permalink
CSS fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsekulic committed Sep 28, 2022
1 parent e72a68a commit 7dfa6e8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { getAccountLink } from '@metamask/etherscan-link';
import { useSelector } from 'react-redux';
import classnames from 'classnames';
import Box from '../../../ui/box';
import IconCopy from '../../../ui/icon/icon-copy';
import IconBlockExplorer from '../../../ui/icon/icon-block-explorer';
Expand Down Expand Up @@ -170,8 +171,18 @@ export default function ContractDetailsModal({
className="contract-details-modal__content__contract"
>
<UrlIcon
className="contract-details-modal__content__contract__identicon"
fallbackClassName="contract-details-modal__content__contract__identicon"
className={classnames({
'contract-details-modal__content__contract__identicon-for-unknown-contact':
addressBookEntry?.data?.name === undefined,
'contract-details-modal__content__contract__identicon':
addressBookEntry?.data?.name !== undefined,
})}
fallbackClassName={classnames({
'contract-details-modal__content__contract__identicon-for-unknown-contact':
addressBookEntry?.data?.name === undefined,
'contract-details-modal__content__contract__identicon':
addressBookEntry?.data?.name !== undefined,
})}
name={origin}
url={siteImage}
/>
Expand Down
4 changes: 4 additions & 0 deletions ui/components/app/modals/contract-details-modal/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
margin: 16px 16px 38px 16px;
}

&__identicon-for-unknown-contact {
margin: 16px;
}

&__buttons {
flex-grow: 1;

Expand Down
3 changes: 0 additions & 3 deletions ui/pages/token-allowance/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.token-allowance-container {
width: inherit;

&__icon-display-content {
width: fit-content;
height: 40px;
Expand All @@ -12,7 +10,6 @@
&__siteimage-identicon {
width: 24px;
height: 24px;
margin-top: 4px;
box-shadow: none;
background: none;
}
Expand Down
41 changes: 27 additions & 14 deletions ui/pages/token-allowance/token-allowance.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export default function TokenAllowance({
};

return (
<Box className="token-allowance-container">
<Box className="token-allowance-container page-container">
<Box
paddingLeft={4}
paddingRight={4}
Expand Down Expand Up @@ -387,18 +387,22 @@ export default function TokenAllowance({
/>
<Box
display={DISPLAY.FLEX}
alignItems={ALIGN_ITEMS.CENTER}
marginTop={6}
marginRight={12}
marginBottom={8}
marginLeft={12}
paddingTop={2}
paddingRight={4}
paddingBottom={2}
paddingLeft={2}
className="token-allowance-container__icon-display-content"
flexDirection={FLEX_DIRECTION.ROW}
justifyContent={JUSTIFY_CONTENT.CENTER}
>
<Box display={DISPLAY.FLEX}>
<Box
display={DISPLAY.FLEX}
alignItems={ALIGN_ITEMS.CENTER}
marginTop={6}
marginRight={12}
marginBottom={8}
marginLeft={12}
paddingTop={2}
paddingRight={4}
paddingBottom={2}
paddingLeft={2}
className="token-allowance-container__icon-display-content"
>
<UrlIcon
className="token-allowance-container__icon-display-content__siteimage-identicon"
fallbackClassName="token-allowance-container__icon-display-content__siteimage-identicon"
Expand Down Expand Up @@ -432,7 +436,12 @@ export default function TokenAllowance({
rpcPrefs={rpcPrefs}
/>
</Box>
<Box marginTop={1}>
<Box
marginTop={1}
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
justifyContent={JUSTIFY_CONTENT.CENTER}
>
<Button
type="link"
onClick={() => setShowContractDetails(true)}
Expand Down Expand Up @@ -464,7 +473,11 @@ export default function TokenAllowance({
})}
</Box>
)}
<Box>
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
justifyContent={JUSTIFY_CONTENT.CENTER}
>
<Button
type="link"
onClick={() => setShowFullTxDetails(!showFullTxDetails)}
Expand Down

0 comments on commit 7dfa6e8

Please sign in to comment.