@gouvfr/dsfr-roller
Version:
Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR
25 lines (19 loc) • 652 B
JavaScript
import { Component } from '../component.js';
class Search extends Component {
constructor (data) {
super(data, 'search');
}
get ejsPath () {
return 'src/dsfr/component/search/template/ejs/search.ejs';
}
async format () {
const title = this.data.title || this.data.label;
const search = {
id: this.data.id,
input: { id: this.data.inputId, placeholder: this.data.label, classes: this.data.inputClasses, label: this.data.label },
button: { id: this.data.buttonId, label: this.data.label, classes: this.data.buttonClasses, title: title, markup: 'button' }
};
return search;
}
}
export { Search };