Sfoglia il codice sorgente

replace label with placeholder

mightyplow 4 anni fa
parent
commit
744f628be7
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      src/components/caloriesInput/CaloriesInput.tsx

+ 4 - 4
src/components/caloriesInput/CaloriesInput.tsx

@@ -47,14 +47,14 @@ function CaloriesInput ({addCalories, saveCalories, item}: CaloriesInputProps) {
     <form onSubmit={onSubmit} className={styles.caloriesInput}>
       <div className={styles.inputWrapper}>
         <div className={styles.formRow}>
-          <label htmlFor="caloriesTitle">Nahrungsmittel:</label>
-          <input key={itemTitle} id="caloriesTitle" name="caloriesTitle" type="text" defaultValue={itemTitle}
+          <input key={itemTitle} id="caloriesTitle" placeholder="Nahrungsmittel" name="caloriesTitle" type="text"
+                 defaultValue={itemTitle}
                  required />
         </div>
 
         <div className={styles.formRow}>
-          <label htmlFor="caloriesCount">Kalorien:</label>
-          <input key={itemCount} id="caloriesCount" name="caloriesCount" type="number" defaultValue={itemCount}
+          <input key={itemCount} id="caloriesCount" placeholder="Kalorien" name="caloriesCount" type="number"
+                 defaultValue={itemCount}
                  required />
         </div>
       </div>