Skip to content

Commit

Permalink
Use namespaced Radix components
Browse files Browse the repository at this point in the history
  • Loading branch information
Destiner committed May 17, 2024
1 parent 8630f02 commit 43fe623
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/components/ViewCallData.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<AccordionRoot
<Accordion.Root
type="single"
class="actions"
:collapsible="true"
Expand All @@ -9,11 +9,11 @@
v-for="(call, callIndex) in calls"
:key="callIndex"
>
<AccordionItem
<Accordion.Item
class="action"
:value="callIndex.toString()"
>
<AccordionTrigger class="action-trigger">
<Accordion.Trigger class="action-trigger">
<div class="side">
<div class="action-index">{{ callIndex + 1 }}</div>
<div class="action-description">
Expand All @@ -38,8 +38,8 @@
<div class="side">
<IconChevronDown class="icon" />
</div>
</AccordionTrigger>
<AccordionContent class="action-content">
</Accordion.Trigger>
<Accordion.Content class="action-content">
<div class="action-details">
<div class="action-detail">
<div class="action-detail-label">Address</div>
Expand All @@ -64,25 +64,20 @@
<div class="action-detail-value">{{ call.data }}</div>
</div>
</div>
</AccordionContent>
</AccordionItem>
</Accordion.Content>
</Accordion.Item>
</template>
</template>
<template v-else>
<div class="call-data">
{{ value }}
</div>
</template>
</AccordionRoot>
</Accordion.Root>
</template>

<script setup lang="ts">
import {
AccordionRoot,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from 'radix-vue';
import { Accordion } from 'radix-vue/namespaced';
import { Address, Hex } from 'viem';
import { computed, ref, watch } from 'vue';
Expand Down

0 comments on commit 43fe623

Please sign in to comment.