diff --git a/packages/dye/composables/eyedropper.ts b/packages/dye/composables/eyedropper.ts index 7471bec..363b7c7 100644 --- a/packages/dye/composables/eyedropper.ts +++ b/packages/dye/composables/eyedropper.ts @@ -1,7 +1,7 @@ -import { colorName } from "./colorName" +import { colorName } from './colorName' function getColor(hex: string) { - colorName(hex)() + colorName(hex) } function notSupported() { @@ -16,11 +16,14 @@ function notSupported() { const dropper = new window.EyeDropper() function openDropper(fn = getColor) { - dropper.open().then((result: {sRGBHex: string}) => fn(result.sRGBHex)) + dropper.open().then((result: { sRGBHex: string }) => fn(result.sRGBHex)) } export function eyeDropper(fn = getColor) { - if(notSupported()) return - try { openDropper(fn) } - catch (err) { console.log(err) } -} \ No newline at end of file + if (notSupported()) return + try { + openDropper(fn) + } catch (err) { + console.log(err) + } +} diff --git a/packages/dye/index.ts b/packages/dye/index.ts index a97d9b0..690b708 100644 --- a/packages/dye/index.ts +++ b/packages/dye/index.ts @@ -1,5 +1,5 @@ import DyePicker from './components/DyePicker.vue' -import DyeWrapper from '@components/DyeWrapper.vue' +import DyeWrapper from '/components/DyeWrapper.vue' import Pallet from './components/Pallet.vue' import ColorCanvas from './components/Canvas/ColorCanvas.vue' import HueCanvas from './components/Canvas/HueCanvas.vue'