From a8ed8ab2ed01bd44b3bdb35d510e29b785a0d2d0 Mon Sep 17 00:00:00 2001 From: felicia-haggqvist <144792260+felicia-haggqvist@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:57:39 +0200 Subject: [PATCH] feat: add more functionality to attention component (#161) * fix: add tooltip to attentionState * feat: add crossAxis prop * feat: only render attention component when targetEl is not undefined or when callout * fix: add targetEl prop to wAttention-test * fix: mock targetEl prop in wAttention-test-file * fix: revert adding isTooltip to attentionState * fix: bump to latest version of @warp-ds/core --- components/attention/w-attention.vue | 7 ++++++- dev/pages/Attention.vue | 7 ++++--- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- test/wAttention.test.js | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/components/attention/w-attention.vue b/components/attention/w-attention.vue index 8de8aa17..7e6ceae3 100644 --- a/components/attention/w-attention.vue +++ b/components/attention/w-attention.vue @@ -45,6 +45,10 @@ const props = defineProps({ type: Boolean, default: false }, + crossAxis: { + type: Boolean, + default: false + }, fallbackPlacements: { type: Array, validator(values) { @@ -88,6 +92,7 @@ const attentionState = computed(() => ({ distance: props.distance, skidding: props.skidding, flip: props.flip, + crossAxis: props.crossAxis, fallbackPlacements: props.fallbackPlacements, waitForDOM: nextTick })); @@ -212,7 +217,7 @@ onUnmounted(async () => {