Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

feat: widget instructions update #522

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions domains/grid/components/AddWidgetBasic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,35 @@ const hasInstructions = computed(() => widgetInstructions.value !== '-')
}}

<!-- Instructions -->
<template v-if="hasInstructions">
<span
v-if="isInstructionsVisible"
class="cursor-pointer text-blue-60 underline hover:text-blue-50"
@click="isInstructionsVisible = !isInstructionsVisible"
>Hide instructions</span
>
<span
v-else
class="cursor-pointer text-blue-60 underline hover:text-blue-50"
@click="isInstructionsVisible = !isInstructionsVisible"
>Show instructions</span
>
<div v-if="hasInstructions" class="mt-2">
<div class="flex items-center">
<span
v-if="isInstructionsVisible"
class="cursor-pointer text-purple-51 underline hover:text-purple-41"
@click="isInstructionsVisible = !isInstructionsVisible"
>Hide instructions</span
>
<span
v-else
class="cursor-pointer text-purple-51 underline hover:text-purple-41"
@click="isInstructionsVisible = !isInstructionsVisible"
>Show instructions</span
>
<lukso-icon
name="arrow-down-sm"
color="purple-51"
:class="{
'rotate-180 transition': isInstructionsVisible,
}"
></lukso-icon>
</div>
<div
v-if="isInstructionsVisible"
class="mt-4 animate-fade-in whitespace-pre-line font-600 break-word"
>
{{ widgetInstructions }}
</div>
</template>
</div>
</div>

<!-- Content -->
Expand Down
Loading