Skip to content

Commit

Permalink
feat: PR changes
Browse files Browse the repository at this point in the history
RST-2559
  • Loading branch information
annacv committed Dec 11, 2024
1 parent abbe454 commit 0e18a0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/components/related-prompts/custom-related-prompts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</i18n-t>

<div class="x-flex x-flex-col">
<RelatedPromptsTagList class="x-mt-24" />
<RelatedPromptsTagList :class="isDesktopOrGreater ? 'x-mt-24' : 'x-mt-16'" />
<CustomQueryPreview
v-if="selectedPrompt !== -1"
:key="queriesPreviewInfo.length"
Expand All @@ -31,6 +31,7 @@ import type { PropType } from 'vue'
import { use$x, useState } from '@empathyco/x-components'
import { relatedPromptsXModule } from '@empathyco/x-components/related-prompts'
import { computed, defineComponent } from 'vue'
import { useDevice } from '../../composables/use-device.composable'
import CustomQueryPreview from '../search/results/custom-query-preview.vue'
import RelatedPromptsTagList from './related-prompts-tag-list.vue'
Expand All @@ -50,6 +51,7 @@ export default defineComponent({
},
setup() {
const x = use$x()
const { isDesktopOrGreater } = useDevice()
const { relatedPrompts, selectedPrompt, selectedQuery } = useState('relatedPrompts', [
'relatedPrompts',
'selectedPrompt',
Expand All @@ -66,6 +68,7 @@ export default defineComponent({
})
return {
isDesktopOrGreater,
queriesPreviewInfo,
selectedPrompt,
x,
Expand Down
6 changes: 3 additions & 3 deletions src/components/related-prompts/related-prompts-tag-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>
<div
ref="slidingPanelContent"
class="x-flex x-gap-16 x-font-main desktop:x-mx-0 desktop:x-mb-0"
class="x-flex x-gap-8 x-font-main desktop:x-mx-0 desktop:x-mb-0"
:class="{ 'x-w-[calc(100%)]': selectedIndex !== -1 }"
>
<div
Expand Down Expand Up @@ -42,8 +42,8 @@
{{ suggestion.suggestionText }}
</span>
</div>
<CrossTinyIcon v-if="isSelected(index)" class="x-icon-lg" />
<PlusIcon v-else class="x-icon-neutral-80 x-icon-lg" />
<CrossTinyIcon v-if="isSelected(index)" class="x-icon-lg" />
<PlusIcon v-else class="x-icon-neutral-80 x-icon-lg" />
</button>
</div>
</div>
Expand Down

0 comments on commit 0e18a0c

Please sign in to comment.