Skip to content
Snippets Groups Projects
Select Git revision
  • b507c1c381c4b18d1f996344ff50e92d1858ca90
  • main default protected
2 results

procedure-dhcp.md

Blame
  • 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)} €`
    						),
    					]),
    				]),
    			]),
    		]);
    	}
    }