Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CarelessCourage committed Feb 14, 2024
1 parent 6cc2f1a commit 3397839
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 3 additions & 7 deletions packages/dye/components/DyePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface DyeProps {
const props = withDefaults(defineProps<DyeProps>(), {
default: '#ff0000',
compact: false
compact: true
})
// Logic
Expand All @@ -44,15 +44,11 @@ function change(color: OutputColor) {
color: colord(color.hex)
})
}
function clickOutside() {
dye.setColor('#50b7be', true)
}
</script>

<template>
<DyeWrapper :compact="compact" v-on-click-outside="clickOutside">
<Pallet :compact="compact" @click="() => (compact = !compact)" />
<DyeWrapper :compact="compact" v-on-click-outside="() => (compact = true)">
<Pallet :compact="compact" @click="() => (compact = false)" />
<ColorCanvas @change="change" :min="0" :max="100" />
<HueCanvas @change="change" />
</DyeWrapper>
Expand Down
2 changes: 0 additions & 2 deletions packages/dye/composables/useDye.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export const useDye = defineStore('dye', () => {
if (isString) {
const name = colorName(value).name
color.value = { name, hex }

console.log('string', { name, hex })
} else {
color.value = value
}
Expand Down

0 comments on commit 3397839

Please sign in to comment.