Refactor material catalog for roofing and flooring

This commit is contained in:
sudhir
2026-05-20 00:52:01 +00:00
committed by open-pascal
parent a3378a666d
commit a9d26239b7
45 changed files with 118 additions and 191 deletions
@@ -22,6 +22,11 @@ type MaterialPickerProps = {
hideSideControl?: boolean
}
function getCategoryLabel(category: (typeof MATERIAL_CATEGORIES)[number]) {
if (category === 'roof') return 'Roofing'
return category.charAt(0).toUpperCase() + category.slice(1)
}
export function MaterialPicker({
value,
selectedMaterialPreset,
@@ -156,7 +161,7 @@ export function MaterialPicker({
}}
type="button"
>
{category.charAt(0).toUpperCase() + category.slice(1)}
{getCategoryLabel(category)}
</button>
))}
</div>