Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/basecomponents/BaseAdvancedSettingsButton.vue

40 lines
739 B

<template>
<div class="field">
<BaseButton
:label="showAdvancedSettingsLabel"
class="mr-auto"
icon="cog"
type="black"
@click="$emit('update:modelValue', !modelValue)"
/>
</div>
<div v-if="modelValue">
<slot></slot>
</div>
</template>
<script setup>
import BaseButton from "./BaseButton.vue";
import { computed } from "vue"
import { useI18n } from "vue-i18n";
const props = defineProps({
modelValue: {
type: Boolean,
required: true,
}
})
defineEmits(['update:modelValue'])
const { t } = useI18n();
const showAdvancedSettingsLabel = computed(() => {
if (props.modelValue) {
return t("Hide advanced settings");
}
return t("Show advanced settings");
});
</script>