tokkozhin / react-native-qrcode-styled

Fully customizable QR Codes generator for React Native
MIT License
156 stars 7 forks source link

How do dismiss transparent background color for qr code? #5

Closed IZZAGOLD closed 11 months ago

IZZAGOLD commented 1 year ago

Hello, thanks for your work, your library is great! I'm using react-native-share to share qr. But it has a transparent background. How can you solve the problem?

function shareQrCode(dataURL: string) {
    const imageBase64 = `data:image/png;base64 ,${dataURL}`
    const shareOptions = {
      title: 'Test',
      message: 'Test QR code:',
      url: imageBase64,
      subject: 'Share QR',
      type: 'image/png',
    }

    Share.open(shareOptions).catch(noop)
  }
<QRCodeStyled
            data={touchPayData}
            style={styles.svg}
            padding={2}
            pieceSize={5}
            color={'black'}
            innerEyesOptions={{
              borderRadius: 4,
              color: 'black',
            }}
            pieceScale={1.02}
            outerEyesOptions={{
              borderRadius: 12,
              color: COLORS.ORANGE200,
            }}
            logo={{
              href: require('../../shared/ui/assets/img/e-wallet_logo.png'),
              padding: 4,
            }}
          />
tokkozhin commented 11 months ago

Good question! Unfortunately there is not possible now, but I will try to add it soon.