| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 27a868f commit 3e36281
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,28 +9,34 @@ import { AutoRow, RowBetween } from 'components/Row' | |||
| 9 | 9 | import { useActiveWeb3React } from 'hooks/web3' | |
| 10 | 10 | import { useState } from 'react' | |
| 11 | 11 | import styled from 'styled-components/macro' | |
| 12 | - import { CloseIcon, ExternalLink, TYPE } from 'theme' | ||
| 12 | + import { CloseIcon, ExternalLink, TYPE, Z_INDEX } from 'theme' | ||
| 13 | 13 | ||
| 14 | 14 | import { useUnsupportedTokens } from '../../hooks/Tokens' | |
| 15 | 15 | import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' | |
| 16 | 16 | ||
| 17 | 17 | const DetailsFooter = styled.div<{ show: boolean }>` | |
| 18 | 18 | padding-top: calc(16px + 2rem); | |
| 19 | 19 | padding-bottom: 20px; | |
| 20 | + margin-left: auto; | ||
| 21 | + margin-right: auto; | ||
| 20 | 22 | margin-top: -2rem; | |
| 21 | 23 | width: 100%; | |
| 22 | 24 | max-width: 400px; | |
| 23 | 25 | border-bottom-left-radius: 20px; | |
| 24 | 26 | border-bottom-right-radius: 20px; | |
| 25 | 27 | color: ${({ theme }) => theme.text2}; | |
| 26 | 28 | background-color: ${({ theme }) => theme.advancedBG}; | |
| 27 | - z-index: -1; | ||
| 29 | + z-index: ${Z_INDEX.deprecated_zero}; | ||
| 28 | 30 | ||
| 29 | 31 | transform: ${({ show }) => (show ? 'translateY(0%)' : 'translateY(-100%)')}; | |
| 30 | 32 | transition: transform 300ms ease-in-out; | |
| 31 | 33 | text-align: center; | |
| 32 | 34 | ` | |
| 33 | 35 | ||
| 36 | + const StyledButtonEmpty = styled(ButtonEmpty)` | ||
| 37 | + text-decoration: none; | ||
| 38 | + ` | ||
| 39 | + | ||
| 34 | 40 | const AddressText = styled(TYPE.blue)` | |
| 35 | 41 | font-size: 12px; | |
| 36 | 42 | ||
@@ -101,11 +107,11 @@ export default function UnsupportedCurrencyFooter({ | |||
| 101 | 107 | </AutoColumn> | |
| 102 | 108 | </Card> | |
| 103 | 109 | </Modal> | |
| 104 | - <ButtonEmpty padding={'0'} onClick={() => setShowDetails(true)}> | ||
| 110 | + <StyledButtonEmpty padding={'0'} onClick={() => setShowDetails(true)}> | ||
| 105 | 111 | <TYPE.blue> | |
| 106 | 112 | <Trans>Read more about unsupported assets</Trans> | |
| 107 | 113 | </TYPE.blue> | |
| 108 | - </ButtonEmpty> | ||
| 114 | + </StyledButtonEmpty> | ||
| 109 | 115 | </DetailsFooter> | |
| 110 | 116 | ) | |
| 111 | 117 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | import React from 'react' | |
| 2 | 2 | import styled from 'styled-components/macro' | |
| 3 | + import { Z_INDEX } from 'theme' | ||
| 3 | 4 | ||
| 4 | 5 | export const BodyWrapper = styled.main<{ margin?: string; maxWidth?: string }>` | |
| 5 | 6 | position: relative; | |
@@ -11,6 +12,7 @@ export const BodyWrapper = styled.main<{ margin?: string; maxWidth?: string }>` | |||
| 11 | 12 | 0px 24px 32px rgba(0, 0, 0, 0.01); | |
| 12 | 13 | border-radius: 24px; | |
| 13 | 14 | margin-top: 1rem; | |
| 15 | + z-index: ${Z_INDEX.deprecated_content}; | ||
| 14 | 16 | ` | |
| 15 | 17 | ||
| 16 | 18 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,21 @@ export const MEDIA_WIDTHS = { | |||
| 21 | 21 | upToLarge: 1280, | |
| 22 | 22 | } | |
| 23 | 23 | ||
| 24 | + // Migrating to a standard z-index system https://getbootstrap.com/docs/5.0/layout/z-index/ | ||
| 25 | + // Please avoid using deprecated numbers | ||
| 26 | + export enum Z_INDEX { | ||
| 27 | + deprecated_zero = 0, | ||
| 28 | + deprecated_content = 1, | ||
| 29 | + dropdown = 1000, | ||
| 30 | + sticky = 1020, | ||
| 31 | + fixed = 1030, | ||
| 32 | + modalBackdrop = 1040, | ||
| 33 | + offcanvas = 1050, | ||
| 34 | + modal = 1060, | ||
| 35 | + popover = 1070, | ||
| 36 | + tooltip = 1080, | ||
| 37 | + } | ||
| 38 | + | ||
| 24 | 39 | const mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys(MEDIA_WIDTHS).reduce( | |
| 25 | 40 | (accumulator, size) => { | |
| 26 | 41 | ;(accumulator as any)[size] = (a: any, b: any, c: any) => css` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments