Themes: init

This commit is contained in:
He4eT 2021-02-19 19:08:31 +05:00
commit cbc6207ad9
9 changed files with 108 additions and 46 deletions

View file

@ -1,10 +1,10 @@
import { h } from 'preact'
export default function ({ emitName, emitURL }) {
export default function ({ setTargetName, setTargetUrl }) {
const fileInputHandler = ({ target }) => {
const file = target.files[0]
emitName(file.name)
emitURL(`${URL.createObjectURL(file)}#${file.name}`)
setTargetName(file.name)
setTargetUrl(`${URL.createObjectURL(file)}#${file.name}`)
target.value = null
}