feat: added unit label

This commit is contained in:
Leyla Becker 2026-02-22 16:33:27 -06:00
parent 2cbd931e99
commit 37b300b8e9
2 changed files with 10 additions and 0 deletions

View file

@ -123,6 +123,11 @@
{% if pageType == 'recipe' %} {% if pageType == 'recipe' %}
<style> <style>
.unit-label {
font-size: var(--font-size-small);
color: var(--color-text-muted);
font-weight: var(--font-weight-medium);
}
.measurement-toggles { .measurement-toggles {
display: none; display: none;
flex-direction: column; flex-direction: column;

View file

@ -235,6 +235,11 @@
var unitRow = document.createElement('div'); var unitRow = document.createElement('div');
unitRow.className = 'toggle-row'; unitRow.className = 'toggle-row';
var unitLabel = document.createElement('span');
unitLabel.className = 'unit-label';
unitLabel.textContent = 'Unit:';
unitRow.appendChild(unitLabel);
var typeOrder = ['temperature', 'weight', 'volume', 'dimension', 'time']; var typeOrder = ['temperature', 'weight', 'volume', 'dimension', 'time'];
typeOrder.forEach(function (type) { typeOrder.forEach(function (type) {
if (!typeHasToggle[type]) return; if (!typeHasToggle[type]) return;