Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • Partie-ingrédient-finie
2 results

README.md

Blame
  • Forked from Yvan Peter / m4102_tp3
    Source project has a limited visibility.
    PizzaList.js 409 B
    import Component from '../components/Component.js';
    import PizzaThumbnail from '../components/PizzaThumbnail.js';
    
    export default class PizzaList extends Component {
    	#pizzas;
    
    	constructor(pizzas) {
    		super('section', { name: 'class', value: 'pizzaList' });
    		this.pizzas = pizzas;
    	}
    
    	set pizzas(value) {
    		this.#pizzas = value;
    		this.children = this.#pizzas.map(pizza => new PizzaThumbnail(pizza));
    	}
    }