Skip to content

Commit

Permalink
web: Update Book component
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Dec 3, 2024
1 parent ad32e55 commit 9044778
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
12 changes: 8 additions & 4 deletions apps/web/src/components/Book.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
class="page-image"
:class="{ opened: opening || opened }"
:style="{
backgroundColor: page.url ? undefined : 'lightgrey',
backgroundImage: page.url ? `url(${page.url})` : undefined,
backgroundColor: page.image ? undefined : 'lightgrey',
backgroundImage: page.image
? `url(${page.image.url})`
: undefined,
marginLeft: opening || opened ? '0' : `${edgeWidth}px`,
}"
@transitionend="onEndOpenCloseTransition()"
Expand All @@ -28,7 +30,7 @@
</div>
</template>

<script setup lang="ts" generic="Page extends { url: string|null }">
<script setup lang="ts" generic="Page extends { image: {url: string }|null}">
import { PageFlip } from "page-flip";
const { pages, edgeWidth, coverRatio, coverHeight } = defineProps<{
Expand All @@ -37,7 +39,9 @@ const { pages, edgeWidth, coverRatio, coverHeight } = defineProps<{
coverRatio: number;
coverHeight?: number;
}>();
const emit = defineEmits<{ (e: "close-book"): void }>();
const emit = defineEmits<{
(e: "close-book"): void;
}>();
const slots = defineSlots<{
edge(): unknown;
"table-of-contents"(): unknown;
Expand Down
17 changes: 14 additions & 3 deletions apps/whattheduck/android/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/whattheduck/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
classpath 'com.android.tools.build:gradle:8.7.3'
classpath 'com.google.gms:google-services:4.4.2'

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit 9044778

Please sign in to comment.