Skip to content

Commit 1de09f1

Browse files
fix: simplify ImageViewer component props and update usage in documentation (#22)
1 parent 94c62ed commit 1de09f1

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

src/components/ImageViewer.vue

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,34 @@
11
<template>
2-
<div :class="['my-8', { 'text-center': centered }]">
2+
<div class="my-8">
33
<a :href="linkUrl" target="_blank" rel="noreferrer">
44
<img
55
:src="imageUrl"
66
:alt="imageAlt"
7-
:style="{
8-
width: '100%',
9-
maxWidth: maxWidth,
10-
borderRadius: borderRadius,
11-
border: '1px solid var(--vp-c-border)',
12-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
13-
}"
14-
class="transition-transform duration-200 ease-in-out hover:-translate-y-1 hover:shadow-xl"
7+
class="border-border w-full rounded-lg border shadow-lg transition-transform duration-200 ease-in-out hover:-translate-y-1 hover:shadow-xl"
158
/>
169
</a>
1710
<p v-if="caption" class="mt-4 font-medium">
18-
<a
11+
<Button
1912
:href="linkUrl"
2013
target="_blank"
2114
rel="noreferrer"
22-
class="text-primary hover:text-primary2 inline-flex items-center gap-2 no-underline transition-colors duration-200"
15+
class="text-primary hover:text-primary2 inline-flex items-center gap-2 rounded-lg no-underline transition-colors duration-200"
2316
>
2417
{{ caption }}
25-
</a>
18+
</Button>
2619
</p>
2720
</div>
2821
</template>
2922

3023
<script setup lang="ts">
24+
import Button from './ui/Button.vue';
25+
3126
interface Props {
3227
imageUrl: string;
3328
imageAlt: string;
3429
linkUrl: string;
3530
caption?: string;
36-
centered?: boolean;
37-
maxWidth?: string;
38-
borderRadius?: string;
3931
}
4032
41-
withDefaults(defineProps<Props>(), {
42-
centered: true,
43-
maxWidth: '800px',
44-
borderRadius: '8px',
45-
});
33+
defineProps<Props>();
4634
</script>

src/overview/tooling-and-explorers/iexec-explorer.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,13 @@ Browse and analyze all tasks across the iExec network:
110110
image-alt="Result Decryption"
111111
link-url="https://explorer.iex.ec/bellecour/tasks"
112112
caption="🔗 Explore Tasks"
113-
:centered="true"
114-
max-width="700px"
115113
/>
116114

117115
<ImageViewer
118116
image-url="/assets/tooling-&-explorers/iexec-explorer/task-details-completed.png"
119117
image-alt="Task Completed"
120118
link-url="https://explorer.iex.ec/bellecour/tasks"
121119
caption="🔗 Explore Tasks"
122-
:centered="true"
123-
max-width="700px"
124120
/>
125121

126122
> **🔗 Task Assets**: Each task involves four key assets working together: the

0 commit comments

Comments
 (0)