Explorar o código

improve portfolio tables alignment

Daniel Bohry hai 9 meses
pai
achega
570efab5b1
Modificáronse 1 ficheiros con 13 adicións e 11 borrados
  1. 13 11
      src/routes/portfolio/+page.svelte

+ 13 - 11
src/routes/portfolio/+page.svelte

@@ -441,23 +441,25 @@
 								class="flex items-center"
 							>
 								<input type="hidden" name="code" value={stock.code} />
-								<input
-									type="number"
-									name="quantity"
-									min="0"
-									value={stock.quantity}
-									class="w-16 px-2 py-1 text-right border rounded-lg text-sm text-gray-800 dark:text-gray-100 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-300"
-									on:input={handleInputChange}
-								/>
+								<div class="w-20">
+									<input
+										type="number"
+										name="quantity"
+										min="0"
+										value={stock.quantity}
+										class="block w-full px-2 py-1 text-right rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
+										on:input={handleInputChange}
+									/>
+								</div>
 							</form>
 						</td>
-						<td class="px-4 py-2 font-semibold text-green-600 dark:text-green-400"
+						<td class="px-4 py-2 font-semibold text-green-600 dark:text-green-400 text-center"
 							>{formatCurrency(stock.price)}</td
 						>
-						<td class="px-4 py-2 font-semibold text-gray-800 dark:text-gray-200"
+						<td class="px-4 py-2 font-semibold text-gray-800 dark:text-gray-200 text-center"
 							>{formatCurrency(stock.total)}</td
 						>
-						<td class="px-4 py-2 text-blue-600 dark:text-blue-400"
+						<td class="px-4 py-2 text-blue-600 dark:text-blue-400 text-center"
 							>{calculatePercentage(stock.total, totalValue)}%</td
 						>
 						<td class="px-4 py-2 text-right">