Parcourir la source

fix create button appearance

Olivier Massot il y a 2 ans
Parent
commit
938f296fb7
1 fichiers modifiés avec 16 ajouts et 7 suppressions
  1. 16 7
      components/Layout/Header/UniversalCreation/CreateButton.vue

+ 16 - 7
components/Layout/Header/UniversalCreation/CreateButton.vue

@@ -5,14 +5,23 @@ bouton Créer
 <template>
   <main>
     <v-btn
-      elevation="asIcon ? 0 : 2"
-      :class="asIcon ? 'theme-primary' : 'theme-x-create-btn'"
-      :icon="asIcon"
-      :size="asIcon ? 'small' : 'default mr-2'"
-      @click="showDialog=true"
+        v-if="asIcon"
+        :elevation="0"
+        class="theme-primary"
+        :icon="true"
+        size="small"
+        @click="showDialog=true"
     >
-      <v-icon v-if="asIcon">fas fa-plus</v-icon>
-      <span v-else>{{ $t('create') }}</span>
+      <v-icon>fas fa-plus</v-icon>
+    </v-btn>
+
+    <v-btn
+        v-else
+        :elevation="2"
+        class="theme-x-create-btn"
+        @click="showDialog=true"
+    >
+      <span>{{ $t('create') }}</span>
     </v-btn>
 
     <LayoutDialog :show="showDialog" >