-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(c-key-value-list): got rid of table for layout (#611)
- Loading branch information
1 parent
c7d4562
commit 7ab9204
Showing
6 changed files
with
50 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts" setup> | ||
import _ from 'lodash'; | ||
import type { CKeyValueListItem } from './c-key-value-list.types'; | ||
const props = defineProps<{ item: CKeyValueListItem }>(); | ||
const { item } = toRefs(props); | ||
</script> | ||
|
||
<template> | ||
<div v-if="_.isArray(item.value)"> | ||
<div v-for="value in item.value" :key="value"> | ||
<c-text-copyable :value="value" :show-icon="item.showCopyButton ?? true" /> | ||
</div> | ||
</div> | ||
<div v-else-if="_.isBoolean(item.value)"> | ||
<c-text-copyable :value="item.value ? 'true' : 'false'" :displayed-value="item.value ? 'Yes' : 'No'" :show-icon="item.showCopyButton ?? true" /> | ||
</div> | ||
<div v-else-if="_.isNumber(item.value)" font-mono> | ||
<c-text-copyable :value="String(item.value)" :show-icon="item.showCopyButton ?? true" /> | ||
</div> | ||
<div v-else-if="_.isNil(item.value) || item.value === ''" op-70> | ||
{{ item.placeholder ?? 'N/A' }} | ||
</div> | ||
<div v-else> | ||
<c-text-copyable :value="item.value" :show-icon="item.showCopyButton ?? true" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7ab9204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
it-tools – ./
it-tools.vercel.app
it-tools-git-main-ctmsst.vercel.app
it-tools-ctmsst.vercel.app
it-tools.tech