Skip to content

Commit

Permalink
Rewrite button to HTM
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Nov 12, 2024
1 parent 793ac32 commit f200f9b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ class Button extends Component {
const {name, category, activeCategory} = props;
const isActive = activeCategory === name;

return (
return html`
<button
className={`category-btn ${isActive ? 'active':''}`}
onClick={this.handleClick}
aria-controls={name}
id={name}>
class=${`category-btn ${isActive ? 'active':''}`}
onClick=${this.handleClick}
aria-controls=${name}
id=${name}>
<span
aria-hidden="true"
className="category-icon material-symbols-outlined"
dangerouslySetInnerHTML={{__html: category.icon}}
/>
<div>{category.title}</div>
class="category-icon material-symbols-outlined"
dangerouslySetInnerHTML=${{__html: category.icon}}
></span>
<div>${category?.title}</div>
</button>
);
`;
}
}

Expand Down

0 comments on commit f200f9b

Please sign in to comment.