Ver código fonte

fix create button appearance

Olivier Massot 2 anos atrás
pai
commit
938f296fb7

+ 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" >