Skip to content

Instantly share code, notes, and snippets.

@yano3nora
Last active February 14, 2024 04:44
Show Gist options
  • Save yano3nora/54746c9d1ddf3d93234813ad9d5ca2b0 to your computer and use it in GitHub Desktop.
Save yano3nora/54746c9d1ddf3d93234813ad9d5ca2b0 to your computer and use it in GitHub Desktop.
qrcode.react

qrcode.react

https://github.com/zpao/qrcode.react

$ npm i qrcode.react
import { QRCodeSVG } from 'qrcode.react'

export const QrCode = () => {
  return <Link
    isExternal
    color={'blue'}
    width={200}
    height={200}
    pos={'relative'}
    href={roles[role].link}
  >
    <QRCodeSVG
      value={'https://example.com'}
      width={'100%'}
      height={'100%'}
    />
    <HStack
      pos={'absolute'}
      bottom={-5}
      left={0}
    >
      <FaExternalLinkAlt />
      <Text
        noOfLines={1}
        overflowWrap={'anywhere'}
      >
        {roles[role].link}
      </Text>
    </HStack>
  </Link>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment