Skip to content

Commit 6f83c63

Browse files
authored
feat: New Component Watermark (ant-design#39064)
* feat: New Component Watermark * docs: add watermark docs * docs: add watermark demo * test: add watermark test * test: add watermark snapshot * chore: add jest-canvas-mock * feat: Watermark calculates the width and height of content by default * docs: update docs * docs: update demo * test: update snapshot * docs: update docs * chore: update bundlesize * chore: Optimize code logic * chore: update size-limit * test: update watermark snapshot
1 parent 451d2f6 commit 6f83c63

24 files changed

+2860
-3
lines changed

.jest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function getTestRegex(libDir) {
3434
module.exports = {
3535
verbose: true,
3636
testEnvironment: 'jsdom',
37-
setupFiles: ['./tests/setup.js'],
37+
setupFiles: ['./tests/setup.js', 'jest-canvas-mock'],
3838
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
3939
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'md'],
4040
modulePathIgnorePatterns: ['/_site/'],

components/__tests__/__snapshots__/index.test.ts.snap

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ exports[`antd exports modules correctly 1`] = `
6767
"TreeSelect",
6868
"Typography",
6969
"Upload",
70+
"Watermark",
7071
"message",
7172
"notification",
7273
"theme",

components/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ export { default as Typography } from './typography';
150150
export type { TypographyProps } from './typography';
151151
export { default as Upload } from './upload';
152152
export type { UploadFile, UploadProps } from './upload';
153+
export { default as Watermark } from './watermark';
154+
export type { WatermarkProps } from './watermark';
153155
export { default as QRCode } from './qrcode';
154156
export type { QRCodeProps, QRPropsCanvas } from './qrcode/interface';
155157
export { default as version } from './version';

components/watermark/__tests__/__snapshots__/demo-extend.test.ts.snap

+1,290
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)