Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor SettingsRow #1484

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/settings/SettingsRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-col :class="firstColClasses">
<v-row class="d-flex flex-row">
<v-col v-if="loading" class="col-auto d-flex justify-center align-center pr-0">
<v-progress-circular indeterminate color="primary" :size="24"></v-progress-circular>
<v-progress-circular indeterminate color="primary" :size="24" />
</v-col>
<v-col v-else-if="icon" class="col-auto d-flex justify-center align-center pr-0">
<v-icon>{{ icon }}</v-icon>
Expand All @@ -15,14 +15,15 @@
</v-row>
</v-col>
<v-col :class="secondColClasses">
<slot></slot>
<slot />
</v-col>
</v-row>
</template>

<script lang="ts">
import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '../mixins/base'
import { TranslateResult } from 'vue-i18n'

@Component
export default class SettingsRow extends Mixins(BaseMixin) {
Expand All @@ -33,10 +34,10 @@ export default class SettingsRow extends Mixins(BaseMixin) {
declare readonly icon: string

@Prop({ required: true })
declare readonly title: string
declare readonly title: string | TranslateResult

@Prop({ required: false })
declare readonly subTitle: string
declare readonly subTitle: string | TranslateResult

@Prop({ required: false, default: false })
declare readonly dynamicSlotWidth: boolean
Expand Down