Skip to content

Commit

Permalink
feat: start demo to star
Browse files Browse the repository at this point in the history
  • Loading branch information
FliPPeDround committed Aug 20, 2024
1 parent d67f67d commit 42cfba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/components/repl/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function handleKeydown(evt: KeyboardEvent) {

<style>
.vue-repl {
--color-branding: #a8b1ff !important;
height: 720px !important;
}
.tab-buttons {
Expand Down
7 changes: 3 additions & 4 deletions docs/guide/start/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,27 @@ function animate() {
}
animate()
const fill = ref('#32cd79')
const fill = ref('#a8b1ff')
function changeColor() {
fill.value = `#${Math.floor(Math.random() * 0xFFFFFF).toString(16)}`
}
</script>

<template>
<LeaferApp :width="650" :height="340">
<LeaferApp :width="650" :height="340" fill="#1b1b1f" @tap="changeColor">
<Leafer @tap="changeColor">
<template
v-for="row in 33"
:key="row"
>
<Rect
<Star
v-for="col in 17"
:key="col"
:rotation="rotation"
:x="(row - 1) * 20" :y="(col - 1) * 20"
:width="15" :height="15"
:fill="fill"
:draggable="true"
@tap="changeColor"
/>
</template>
</Leafer>
Expand Down

0 comments on commit 42cfba4

Please sign in to comment.