Spaces:
Sleeping
Sleeping
File size: 1,064 Bytes
7aec436 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
<script>
import {createEventDispatcher} from 'svelte';
import {_} from '../locales/';
import icon from './reset.svg';
const dispatch = createEventDispatcher();
const click = () => {
if (confirm($_('reset.confirm'))) {
dispatch('click');
}
};
</script>
<style>
button {
width: 26px;
height: 26px;
margin: 0;
padding: 4px;
border: none;
background: none;
cursor: pointer;
border-radius: 4px;
}
button:hover {
background: rgba(0, 0, 0, 0.15);
}
button:active {
background: rgba(0, 0, 0, 0.3);
}
:global([theme="dark"]) button:hover {
background: rgba(255, 255, 255, 0.15);
}
:global([theme="dark"]) button:active {
background: rgba(255, 255, 255, 0.3);
}
img {
width: 100%;
height: 100%;
}
:global([theme="dark"]) img {
filter: invert(100%);
}
</style>
<button on:click={click}>
<img
src={icon}
draggable={false}
alt={$_('reset.reset')}
title={$_('reset.reset')}
>
</button>
|