Skip to content

Commit

Permalink
Merge pull request #257 from traPtitech/fix/search_input_height
Browse files Browse the repository at this point in the history
Fix/search_input_height
  • Loading branch information
Pugma authored Dec 8, 2024
2 parents fd184dc + 86f4051 commit 355b7f4
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions src/components/UI/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ import AIcon from './AIcon.vue'
import { computed, ref } from 'vue'
import { useRouter } from 'vue-router'
const props = withDefaults(
defineProps<{
size?: 'large' | 'normal'
placeholder?: string
}>(),
{
size: 'normal',
placeholder: '検索'
}
)
const { size = 'normal', placeholder = '検索' } = defineProps<{
size?: 'large' | 'normal'
placeholder?: string
}>()
const router = useRouter()
const input = ref('')
Expand All @@ -23,10 +17,10 @@ const submit = () => {
}
}
const iconSize = computed(() => {
if (props.size === 'large') return 36
else if (props.size === 'normal') return 20
if (size === 'large') return 36
else if (size === 'normal') return 20
else {
const _exhaustiveCheck: never = props.size
const _exhaustiveCheck: never = size
return _exhaustiveCheck
}
})
Expand Down Expand Up @@ -56,13 +50,12 @@ const iconSize = computed(() => {
border: 2px solid $color-secondary;
border-radius: 4px;
font-size: 14px;
line-height: 1em;
align-items: center;
}
.input {
outline: none;
width: 100%;
height: 1em;
height: 100%;
color: $color-secondary-text;
}
.icon {
Expand Down

0 comments on commit 355b7f4

Please sign in to comment.