import { createStars } from "./components/stars.js";
const starRating = createStars(3); // will create 5 stars, 3 of which are highlighted
const elem = document.getElementById("ceiling-fans-card");
elem.appendChild(starRating);
// There we go, stars on the card
Personally, really enjoyed making it this way, was pretty easy to do, and don't have to worry about building out html and it is pure vanilla
Vanilla Star Rating Component
Example output
What it creates
Using the Component
Personally, really enjoyed making it this way, was pretty easy to do, and don't have to worry about building out html and it is pure vanilla