mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-28 09:18:45 +00:00
Add preview controls
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { DataModel, ModelPath, Path } from '@mcschema/core';
|
||||
import { Tracker } from '../../Tracker';
|
||||
import { transformOutput } from '../../hooks/transformOutput';
|
||||
import { View } from '../../views/View';
|
||||
import { toggleMenu, View } from '../../views/View';
|
||||
import { Octicon } from '../Octicon';
|
||||
import { App } from '../../App';
|
||||
|
||||
@@ -45,12 +45,6 @@ export const SourcePanel = (view: View, model: DataModel) => {
|
||||
el.closest('.panel-controls')?.querySelector('input')
|
||||
Tracker.share()
|
||||
}
|
||||
const toggleMenu = (el: Element) => {
|
||||
el.classList.toggle('active')
|
||||
document.body.addEventListener('click', evt => {
|
||||
el.classList.remove('active')
|
||||
}, { capture: true, once: true })
|
||||
}
|
||||
return `<div class="panel source-panel">
|
||||
<div class="panel-controls">
|
||||
<input style="display: none;">
|
||||
|
||||
Reference in New Issue
Block a user