Skip to content

Commit

Permalink
Add category label alias's
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-carlson committed Sep 8, 2023
1 parent 7401234 commit a46fdcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion www/src/components/CategorySet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Category = (props)=>{
let index = Number(props.index);
return (
<div class="flex flex-col justify-center align-middle">
<h1 class="text-slate-100 text-center text-3xl p-2 capitalize">{cat.name}</h1>
<h1 class="text-slate-100 text-center text-3xl p-2 capitalize">{ cat.alias ?? cat.name}</h1>
<h1 name={cat.name} class="text-xl text-center bg-slate-400 cust-category capitalize" data-category={cat.name} data-option={cat.options[state[index].currentId]}>{cat.options[state[index].currentId]}</h1>
</div>
)
Expand Down
2 changes: 2 additions & 0 deletions www/src/configs/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ const conf = {
categories: [
{
name: 'test1',
alias: 'Test Category / Numbers',
options: ['1','2','3', '4','5','6','7', '8', '9','10']
},
{
name: 'test2',
alias: 'Test Category / Letters',
options: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']
},
],
Expand Down

0 comments on commit a46fdcc

Please sign in to comment.