Aurora Admin v1.2.0: 79 components x 5 ends, doc site, contracts batch 1, playground, regression, deploy ready
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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 }} />
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user