feat(home): add theme and alarm buttons (dummy), and refactor to have less components
This commit is contained in:
17
app/components/Home/BottomScreen/Button.vue
Normal file
17
app/components/Home/BottomScreen/Button.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
x: number;
|
||||
y: number;
|
||||
opacity: number;
|
||||
image: HTMLImageElement;
|
||||
}>();
|
||||
|
||||
useRender((ctx) => {
|
||||
ctx.globalAlpha = props.opacity;
|
||||
ctx.drawImage(props.image, props.x, props.y);
|
||||
});
|
||||
|
||||
defineOptions({
|
||||
render: () => null,
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user