Skip to content
Snippets Groups Projects
Select Git revision
  • b8e446ca6c1efa7eb4b9c833739295ab5fe39ed3
  • master default protected
2 results

PizzaList.js

Blame
  • Forked from an inaccessible project.
    • Thomas Fritsch's avatar
      b8e446ca
      maj solution tp2 · b8e446ca
      Thomas Fritsch authored
      - nouveau dom (maj skin css)
      - HomePage -> PizzaList
      - passage PageRenderer -> Router
      - suppression classe Page (inutile à ce stade avec le Router)
      b8e446ca
      History
      maj solution tp2
      Thomas Fritsch authored
      - nouveau dom (maj skin css)
      - HomePage -> PizzaList
      - passage PageRenderer -> Router
      - suppression classe Page (inutile à ce stade avec le Router)
    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));
    	}
    }