feat(editor): gfx template package (#11480)

This commit is contained in:
Saul-Mirone
2025-04-06 12:24:13 +00:00
parent 41499c1cd6
commit bb1270061a
35 changed files with 189 additions and 42 deletions
@@ -0,0 +1,50 @@
import { css, html, LitElement } from 'lit';
export class AffineTemplateLoading extends LitElement {
static override styles = css`
@keyframes affine-template-block-rotate {
from {
rotate: 0deg;
}
to {
rotate: 360deg;
}
}
.affine-template-block-container {
width: 20px;
height: 20px;
overflow: hidden;
}
.affine-template-block-loading {
display: inline-block;
width: 20px;
height: 20px;
position: relative;
background: conic-gradient(
rgba(30, 150, 235, 1) 90deg,
rgba(0, 0, 0, 0.1) 90deg 360deg
);
border-radius: 50%;
animation: affine-template-block-rotate 1s infinite ease-in;
}
.affine-template-block-loading::before {
content: '';
width: 14px;
height: 14px;
border-radius: 50%;
background-color: white;
position: absolute;
top: 3px;
left: 3px;
}
`;
override render() {
return html`<div class="affine-template-block-container">
<div class="affine-template-block-loading"></div>
</div>`;
}
}