mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
feat: добавить серверную генерацию спрайтов
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { h, render } from 'preact'
|
||||
|
||||
import '@gromlab/svg-sprites/viewer/element'
|
||||
import { IconsIcon } from './sprite/index.js'
|
||||
import { AppIcon } from './app-icons/index.js'
|
||||
import { RemoteAppIcon } from './remote-app-icons/index.js'
|
||||
import './style.css'
|
||||
|
||||
const viewerSources = [
|
||||
() => import('./sprite/.svg-sprite/svg-sprite.manifest.js'),
|
||||
() => import('./app-icons/.svg-sprite/svg-sprite.manifest.js'),
|
||||
() => import('./remote-app-icons/.svg-sprite/svg-sprite.manifest.js'),
|
||||
]
|
||||
|
||||
function App() {
|
||||
@@ -15,7 +17,7 @@ function App() {
|
||||
|
||||
return h('main', null,
|
||||
h('h1', null, 'Preact + Vite'),
|
||||
h(IconsIcon, {
|
||||
h(AppIcon, {
|
||||
'data-testid': 'icon',
|
||||
'data-app': 'preact-vite',
|
||||
icon: 'check',
|
||||
@@ -24,6 +26,15 @@ function App() {
|
||||
height: 64,
|
||||
style: { '--icon-color-1': '#16a34a' },
|
||||
}),
|
||||
h(RemoteAppIcon, {
|
||||
'data-testid': 'remote-icon',
|
||||
'data-app': 'preact-vite-remote',
|
||||
icon: 'check',
|
||||
'aria-label': 'Remote check icon',
|
||||
width: 64,
|
||||
height: 64,
|
||||
style: { '--icon-color-1': '#16a34a' },
|
||||
}),
|
||||
h('gromlab-sprite-viewer', {
|
||||
ref: connectViewer,
|
||||
'viewer-title': 'Preact Vite Viewer',
|
||||
|
||||
Reference in New Issue
Block a user