@redseed/redseed-ui-vue3 6.6.2 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref } from 'vue'
|
|
2
|
+
import { computed, ref, toRefs } from 'vue'
|
|
3
3
|
import ButtonTertiary from '../Button/ButtonTertiary.vue'
|
|
4
4
|
import { useResponsiveWidth } from '../../helpers'
|
|
5
5
|
import { EllipsisVerticalIcon } from '@heroicons/vue/24/outline'
|
|
6
6
|
|
|
7
|
-
defineProps({
|
|
7
|
+
const props = defineProps({
|
|
8
8
|
showAvatar: {
|
|
9
9
|
type: Boolean,
|
|
10
10
|
default: true,
|
|
@@ -32,15 +32,25 @@ defineProps({
|
|
|
32
32
|
singleLine: {
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: true,
|
|
35
|
-
}
|
|
35
|
+
},
|
|
36
|
+
headerOnlyCard: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
36
40
|
})
|
|
37
41
|
|
|
42
|
+
const { showDivider, headerOnlyCard } = toRefs(props)
|
|
43
|
+
|
|
38
44
|
const cardHeaderElement = ref(null)
|
|
39
45
|
|
|
40
46
|
const { responsiveWidth } = useResponsiveWidth(cardHeaderElement, 640)
|
|
41
47
|
|
|
42
48
|
const emit = defineEmits(['click:more-actions'])
|
|
43
49
|
|
|
50
|
+
const shouldPadBottom = computed(() =>
|
|
51
|
+
headerOnlyCard.value ? true : showDivider.value
|
|
52
|
+
)
|
|
53
|
+
|
|
44
54
|
function handleMoreActionsClick() {
|
|
45
55
|
emit('click:more-actions')
|
|
46
56
|
}
|
|
@@ -51,6 +61,7 @@ function handleMoreActionsClick() {
|
|
|
51
61
|
'rsui-card-header',
|
|
52
62
|
{
|
|
53
63
|
'rsui-card-header--divider': showDivider,
|
|
64
|
+
'rsui-card-header--padded-bottom': shouldPadBottom,
|
|
54
65
|
}
|
|
55
66
|
]"
|
|
56
67
|
>
|