Skip to content

Commit d0049bd

Browse files
committed
🎨 refactor: showIsInputTextAreaExpandedButton を showTextAreaExpandButton に名称変更
1 parent 9cf0a4a commit d0049bd

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/components/Main/MainView/MessageInput/MessageInput.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@
2929
v-model:is-left-controls-expanded="isLeftControlsExpanded"
3030
v-model:is-preview-shown="isPreviewShown"
3131
v-model:is-input-text-area-expanded="isInputTextAreaExpanded"
32-
:show-is-input-text-area-expanded-button="
33-
showIsInputTextAreaExpandedButton
34-
"
32+
:show-text-area-expand-button="showTextAreaExpandButton"
3533
:class="$style.leftControls"
3634
@click-add-attachment="addAttachment"
3735
/>
3836
<message-input-text-area
3937
ref="textareaComponentRef"
4038
v-model="state.text"
41-
v-model:show-is-input-text-area-expanded-button="
42-
showIsInputTextAreaExpandedButton
43-
"
39+
v-model:show-text-area-expand-button="showTextAreaExpandButton"
4440
:channel-id="channelId"
4541
:is-posting="isPosting"
4642
:shrink-to-one-line="
@@ -117,7 +113,7 @@ const { channelsMap } = useChannelsStore()
117113
const isLeftControlsExpanded = ref(false)
118114
const isPreviewShown = ref(false)
119115
const isInputTextAreaExpanded = ref(true)
120-
const showIsInputTextAreaExpandedButton = ref(false)
116+
const showTextAreaExpandButton = ref(false)
121117
122118
const isArchived = computed(
123119
() => channelsMap.value.get(props.channelId)?.archived ?? false

src/components/Main/MainView/MessageInput/MessageInputLeftControls.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div :class="$style.outerContainer" :style="outerContainerStyle">
33
<icon-button
4-
v-if="showIsInputTextAreaExpandedButton"
4+
v-if="showTextAreaExpandButton"
55
:class="$style.button"
66
:icon-name="isInputTextAreaExpanded ? 'chevron-down' : 'chevron-up'"
77
icon-mdi
@@ -40,7 +40,7 @@ const props = defineProps<{
4040
isLeftControlsExpanded: boolean
4141
isPreviewShown: boolean
4242
isInputTextAreaExpanded: boolean
43-
showIsInputTextAreaExpandedButton: boolean
43+
showTextAreaExpandButton: boolean
4444
}>()
4545
4646
const emit = defineEmits<{
@@ -69,7 +69,7 @@ const isPreviewShownValue = computed<boolean>({
6969
})
7070
7171
const outerContainerStyle = computed(() => ({
72-
'--justify-content': props.showIsInputTextAreaExpandedButton
72+
'--justify-content': props.showTextAreaExpandButton
7373
? 'space-between'
7474
: 'flex-end'
7575
}))

src/components/Main/MainView/MessageInput/MessageInputTextArea.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ const textareaAutosizeStyle = computed(() => ({
166166
'--max-height': textAreaAutoSizeMaxHeight.value
167167
}))
168168
169-
const showIsInputTextAreaExpandedButton = defineModel<boolean>(
170-
'showIsInputTextAreaExpandedButton',
169+
const showTextAreaExpandButton = defineModel<boolean>(
170+
'showTextAreaExpandButton',
171171
{
172172
default: false
173173
}
@@ -176,7 +176,7 @@ const showIsInputTextAreaExpandedButton = defineModel<boolean>(
176176
const updateShowIsInputTextareaExpandButtonVisibility = () => {
177177
nextTick(() => {
178178
if (textareaRef.value) {
179-
showIsInputTextAreaExpandedButton.value =
179+
showTextAreaExpandButton.value =
180180
textareaRef.value.scrollHeight > textAreaAutoSizeMaxHeightShrunk.value
181181
}
182182
})

0 commit comments

Comments
 (0)