Skip to content

Commit

Permalink
refactor: refactor variables names
Browse files Browse the repository at this point in the history
  • Loading branch information
lauramargar committed Dec 17, 2024
1 parent e6853b2 commit 42440dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="x-related-prompt__button-info">
<span
class="x-typewritter-initial"
:class="[{ 'x-typewritter-animation': arePromptsVisible }]"
:class="[{ 'x-typewritter-animation': isPromptVisible }]"
:style="{
animationDelay: `${index * 0.4 + 0.05}s`,
'--suggestion-text-length': relatedPrompt.suggestionText.length
Expand All @@ -29,7 +29,7 @@
import { relatedPromptsXModule } from '../x-module';
import CrossTinyIcon from '../../../components/icons/cross-tiny.vue';
import PlusIcon from '../../../components/icons/plus.vue';
import { use$x, useState } from '../../../composables/index';
import { use$x } from '../../../composables/index';
/**
* This component shows a suggested related prompt.
Expand All @@ -50,7 +50,7 @@
type: Object as PropType<RelatedPrompt>,
required: true
},
arePromptsVisible: {
isPromptVisible: {
type: Boolean,
default: false
},
Expand All @@ -65,14 +65,12 @@
},
setup() {
const x = use$x();
const { selectedPrompt } = useState('relatedPrompts', ['selectedPrompt']);
const toggleSuggestion = (index: number): void => {
x.emit('UserSelectedARelatedPrompt', index);
};
return {
selectedPrompt,
toggleSuggestion
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<RelatedPrompt
:related-prompt="suggestion"
:index="index"
:are-prompts-visible="arePromptsVisible"
:is-prompt-visible="arePromptsVisible"
:is-selected="isSelected(index)"
/>
</slot>
Expand Down

0 comments on commit 42440dd

Please sign in to comment.