Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Common/QRCode.js
import React, { useState } from 'react'; | import React, { useState } from 'react'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import RawQRCode from 'qrcode.react'; | import RawQRCode from 'qrcode.react'; | ||||
import { | import { | ||||
currency, | currency, | ||||
isValidCashPrefix, | isValidCashPrefix, | ||||
isValidTokenPrefix, | isValidTokenPrefix, | ||||
} from '@components/Common/Ticker.js'; | } from '@components/Common/Ticker.js'; | ||||
import { CopyToClipboard } from 'react-copy-to-clipboard'; | import { CopyToClipboard } from 'react-copy-to-clipboard'; | ||||
import { Event } from '@utils/GoogleAnalytics'; | import { Event } from '@utils/GoogleAnalytics'; | ||||
import { convertToEcashPrefix } from '@utils/cashMethods'; | import { convertToEcashPrefix } from '@utils/cashMethods'; | ||||
export const StyledRawQRCode = styled(RawQRCode)` | export const StyledRawQRCode = styled(RawQRCode)` | ||||
cursor: pointer; | cursor: pointer; | ||||
border-radius: 23px; | border-radius: 26px; | ||||
background: ${props => props.theme.qr.background}; | background: ${props => props.theme.qr.background}; | ||||
box-shadow: ${props => props.theme.qr.shadow}; | box-shadow: ${props => props.theme.qr.shadow}; | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
border: 1px solid ${props => props.theme.wallet.borders.color}; | |||||
path:first-child { | path:first-child { | ||||
fill: ${props => props.theme.qr.background}; | fill: ${props => props.theme.qr.background}; | ||||
} | } | ||||
:hover { | :hover { | ||||
border-color: ${({ xec = 0, ...props }) => | border-color: ${({ xec = 0, ...props }) => | ||||
xec === 1 ? props.theme.primary : props.theme.qr.token}; | xec === 1 ? props.theme.primary : props.theme.qr.token}; | ||||
} | } | ||||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |