14 lines
619 B
JavaScript
14 lines
619 B
JavaScript
import React from 'react';
|
|
import QrCode from '../../common/qrCode';
|
|
import { Spin } from 'antd';
|
|
export default function Render(props) {
|
|
const { url, expiresAt, oakLoading, disableDownload, size, disabled, color, bgColor, maskColor, maskText, maskTextColor, mode } = props.data;
|
|
if (oakLoading) {
|
|
return <Spin />;
|
|
}
|
|
if (url) {
|
|
return (<QrCode url={url} expiresAt={expiresAt} disableDownload={disableDownload} size={size} disabled={disabled} color={color} bgColor={bgColor} maskColor={maskColor} maskText={maskText} maskTextColor={maskTextColor} mode={mode}/>);
|
|
}
|
|
return null;
|
|
}
|