Skip to content

Commit

Permalink
truncate step title a bit for med and smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Jan 27, 2025
1 parent 012a44d commit 3978328
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/profile/ProfileWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<template v-for="_step in steps" :key="`step-${_step.id}`">
<v-stepper-item
:value="_step.id"
:icon="toIcon(_step.state)"
:complete-icon="toIcon(_step.state)"
:color="toColor(_step.state)"
:complete="_step.state === 'complete'"
:title="$t(`${_step.nameKey}`)"
>
<template #title>
<span :class="{ 'max-width text-truncate d-inline-block': isMd }">{{ $t(`${_step.nameKey}`) }}</span>
</template>
</v-stepper-item>

<v-divider v-if="hasMoreSteps(_step)" :key="`divider-${_step.id}`" />
Expand All @@ -29,8 +31,17 @@

<script>
import Steps from './steps'
import { useDisplay } from 'vuetify'
export default {
setup() {
const { mdAndDown, smAndDown } = useDisplay()
return {
isMd: mdAndDown,
isSm: smAndDown,
}
},
data: () => ({
steps: Steps.steps,
currentStep: {},
Expand Down Expand Up @@ -74,3 +85,9 @@ export default {
},
}
</script>

<style>
.max-width {
max-width: 120px;
}
</style>

0 comments on commit 3978328

Please sign in to comment.