fix(ui): ensure consistent styling on all buttons
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 19 Feb 2024 21:12:48 +0000 (22:12 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 19 Feb 2024 21:12:48 +0000 (22:12 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/components/actions/AddChargingStations.vue
ui/web/src/components/actions/SetSupervisionUrl.vue
ui/web/src/components/actions/StartTransaction.vue
ui/web/src/components/buttons/Button.vue
ui/web/src/views/ChargingStationsView.vue

index d0a21276f7f453e4843a871e2a26b1c7758ec555..f2af0905660aa0d3c01761d8d76c8098f38e0a7d 100644 (file)
@@ -18,6 +18,7 @@
   />
   <br />
   <Button
+    id="action-button"
     @click="
       () => {
         uiClient
@@ -37,7 +38,7 @@
   >
     Add Charging Stations
   </Button>
-  <Button @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
+  <Button id="action-button" @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
 </template>
 
 <script setup lang="ts">
index f6ecab10e1ab3fd8917ddfddac7e18d6ddcb06db..6c06ccef5f546f82d4dedf4f96c11744b4874335 100644 (file)
@@ -11,6 +11,7 @@
   />
   <br />
   <Button
+    id="action-button"
     @click="
       () => {
         uiClient
@@ -30,7 +31,7 @@
   >
     Set Supervision Url
   </Button>
-  <Button @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
+  <Button id="action-button" @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
 </template>
 
 <script setup lang="ts">
index 5b1bf2f925c59327e85371f05af087bd60a570e4..ecc5f2da6fb28487406b50b4ac97fe32da0e88ea 100644 (file)
@@ -5,6 +5,7 @@
   <input id="idtag" v-model.trim="state.idTag" type="text" name="idtag" placeholder="RFID tag" />
   <br />
   <Button
+    id="action-button"
     @click="
       () => {
         uiClient
@@ -24,7 +25,7 @@
   >
     Start Transaction
   </Button>
-  <Button @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
+  <Button id="action-button" @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
 </template>
 
 <script setup lang="ts">
index 2b9bfaec38f9d1688ddf2c0cf5899908843ed6b0..6d928342684a35b96da3691314b634b580da711a 100644 (file)
@@ -1,5 +1,11 @@
 <template>
-  <button type="button">
+  <button type="button" class="button">
     <slot></slot>
   </button>
 </template>
+
+<style>
+.button {
+  flex: auto;
+}
+</style>
index b4f7873baf718f29b95635d42f024f76a34c292e..a022e39818105572a428299c100538c735778e73 100644 (file)
@@ -1,9 +1,9 @@
 <template>
   <Container id="charging-stations-container">
     <Container id="buttons-container">
-      <Button id="button" @click="startSimulator()">Start Simulator</Button>
-      <Button id="button" @click="stopSimulator()">Stop Simulator</Button>
-      <Button id="button" @click="$router.push({ name: 'add-charging-stations' })">
+      <Button @click="startSimulator()">Start Simulator</Button>
+      <Button @click="stopSimulator()">Stop Simulator</Button>
+      <Button @click="$router.push({ name: 'add-charging-stations' })">
         Add Charging Stations
       </Button>
       <ReloadButton
@@ -94,8 +94,8 @@ const stopSimulator = (): void => {
   flex-direction: row;
 }
 
-#button {
-  flex: auto;
+#action-button {
+  flex: none;
 }
 
 #reload-button {