mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-27 14:40:43 -05:00
adding components
This commit is contained in:
parent
c392972f8d
commit
2b44a5611e
1 changed files with 44 additions and 0 deletions
44
restaurant/src/components/carousel.js
Normal file
44
restaurant/src/components/carousel.js
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
class Carousel {
|
||||||
|
constructor(items) {
|
||||||
|
this.items = items;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Items {
|
||||||
|
constructor(heading, desc, link) {
|
||||||
|
this.heading = heading;
|
||||||
|
this.desc = desc;
|
||||||
|
this.link = link;
|
||||||
|
|
||||||
|
this._item = {
|
||||||
|
heading: this.heading,
|
||||||
|
desc: this.desc,
|
||||||
|
link: this.link
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get item() {
|
||||||
|
return this._item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let carouselItems = [
|
||||||
|
{
|
||||||
|
"heading": "Specialty Baked Goods",
|
||||||
|
"desc": "Exclusively delicious baked goods, homemade and all that",
|
||||||
|
"link": "Order Now!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "Subscribe and Save today!",
|
||||||
|
"desc": "We offer flexible subscription plans to meet your needs",
|
||||||
|
"link": "Get started"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"heading": "Explore our blog",
|
||||||
|
"desc": "This Wondrous Life teaches you how to dream, inspire, and embrace life",
|
||||||
|
"link": "Embrace this"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
carouselItems.forEach(e => new Items(e));
|
Loading…
Reference in a new issue