fix: use theme token (#43754)

This commit is contained in:
lijianan 2023-07-24 16:05:40 +08:00 committed by GitHub
parent 05f9677df7
commit 127f56073b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ import MutateObserver from '@rc-component/mutate-observer';
import classNames from 'classnames';
import React, { useEffect, useRef } from 'react';
import { getPixelRatio, getStyleStr, reRendering, rotateWatermark } from './utils';
import theme from '../theme';
/**
* Base size of the canvas, 1 for parallel layout and 2 for alternate layout
@ -52,10 +53,10 @@ const Watermark: React.FC<WatermarkProps> = (props) => {
offset,
children,
} = props;
const { token } = theme.useToken();
const {
color = 'rgba(0,0,0,.15)',
fontSize = 16,
color = token.colorFill,
fontSize = token.fontSizeLG,
fontWeight = 'normal',
fontStyle = 'normal',
fontFamily = 'sans-serif',