|
|
|
@ -5,6 +5,7 @@ import { resetComponent } from '../../style';
|
|
|
|
|
export interface ComponentToken {}
|
|
|
|
|
|
|
|
|
|
interface QRCodeToken extends FullToken<'QRCode'> {
|
|
|
|
|
QRCodeExpiredTextColor: string;
|
|
|
|
|
QRCodeMaskBackgroundColor: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -17,6 +18,7 @@ const genQRCodeStyle: GenerateStyle<QRCodeToken> = (token) => {
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
padding: token.paddingSM,
|
|
|
|
|
backgroundColor: token.colorWhite,
|
|
|
|
|
borderRadius: token.borderRadiusLG,
|
|
|
|
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`,
|
|
|
|
|
position: 'relative',
|
|
|
|
@ -38,6 +40,9 @@ const genQRCodeStyle: GenerateStyle<QRCodeToken> = (token) => {
|
|
|
|
|
lineHeight: token.lineHeight,
|
|
|
|
|
background: token.QRCodeMaskBackgroundColor,
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
[`& > ${componentCls}-expired`]: {
|
|
|
|
|
color: token.QRCodeExpiredTextColor,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'&-icon': {
|
|
|
|
|
marginBlockEnd: token.marginXS,
|
|
|
|
@ -53,6 +58,7 @@ const genQRCodeStyle: GenerateStyle<QRCodeToken> = (token) => {
|
|
|
|
|
export default genComponentStyleHook<'QRCode'>('QRCode', (token) =>
|
|
|
|
|
genQRCodeStyle(
|
|
|
|
|
mergeToken<QRCodeToken>(token, {
|
|
|
|
|
QRCodeExpiredTextColor: 'rgba(0, 0, 0, 0.88)',
|
|
|
|
|
QRCodeMaskBackgroundColor: 'rgba(255, 255, 255, 0.96)',
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|