mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 21:46:35 +00:00
feat: add color picker
This commit is contained in:
@@ -10,9 +10,11 @@
|
||||
onFile: (file: File) => void;
|
||||
onError: (message: string) => void;
|
||||
onReset: () => void;
|
||||
pipetteActive?: boolean;
|
||||
onPickColor?: (hex: string) => void;
|
||||
}
|
||||
|
||||
let { source, onFile, onError, onReset }: Props = $props();
|
||||
let { source, onFile, onError, onReset, pipetteActive = false, onPickColor }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
@@ -22,7 +24,7 @@
|
||||
{:else}
|
||||
<DropOverlay {onFile} {onError}>
|
||||
<div class="media">
|
||||
<Preview image={source} />
|
||||
<Preview image={source} pipetteActive={pipetteActive} onPickColor={onPickColor} />
|
||||
</div>
|
||||
<Button variant="secondary" onclick={onReset}>Заменить изображение</Button>
|
||||
</DropOverlay>
|
||||
|
||||
Reference in New Issue
Block a user