Files
aurora-admin/site/sources/watermark/jsx.txt
T
aurora-admin c65a69c34e
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s
feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
2026-09-12 14:18:41 +08:00

15 lines
676 B
Plaintext

import React from 'react';
import './Watermark.css';
export default function Watermark({
text = 'Aurora Admin', color = 'rgba(0,0,0,0.10)', fontSize = 14,
rotate = -22, gap = 160, fullscreen = false
}) {
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='${gap}' height='${gap}'>` +
`<text x='0' y='${fontSize + 6}' font-family='sans-serif' font-size='${fontSize}' fill='${color}' transform='rotate(${rotate} 0 ${fontSize + 6})'> ${text} </text></svg>`;
const bg = `url("data:image/svg+xml;utf8,${encodeURIComponent(svg)}")`;
return (
<div className={'aa-watermark' + (fullscreen ? ' is-fullscreen' : '')} style={{ backgroundImage: bg }} />
);
}