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

PizzaThumbnail.js

Blame
  • Forked from an inaccessible project.
    PizzaThumbnail.js 715 B
    import Component from './Component.js';
    import Img from './Img.js';
    
    export default class PizzaThumbnail extends Component {
    	constructor({ nom, image, prix_petite, prix_grande }) {
    		super('article', { name: 'class', value: 'media' }, [
    			new Component('a', { name: 'href', value: image }, [
    				new Img(image),
    				new Component('section', { name: 'class', value: 'infos' }, [
    					new Component('h4', null, nom),
    					new Component('ul', null, [
    						new Component(
    							'li',
    							null,
    							`Prix petit format : ${prix_petite.toFixed(2)} €`
    						),
    						new Component(
    							'li',
    							null,
    							`Prix grand format : ${prix_grande.toFixed(2)} €`
    						),
    					]),
    				]),
    			]),
    		]);
    	}
    }