import * as React from "react";
import {IProps} from "./qrcode";
import QRCode from "react-native-qrcode-svg";
import {Logger} from "@yoronsoft/js-utils";

const logger = new Logger('Page.Qrcode')
const BasicQrcode: React.FC<IProps> = (props) => {
    if (!props.value) logger.warn('缺少参数 value', props.value);
    return <QRCode value={props.value ?? ''} size={props.size ?? 100}
                   color={props.color ? props.color.toString() : undefined}
                   backgroundColor={props.bg ? props.bg.toString() : undefined}
                   logo={props.logo}
                   logoSize={props.logoSize}
    />
}

export default BasicQrcode
