@gouvfr/dsfr-roller
Version:
Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR
19 lines (14 loc) • 473 B
JavaScript
import { Node } from '../../../node.js';
import { Search } from '../../../../component/components/search.js';
class SearchLeafDirective extends Node {
constructor (data) {
super(data);
this.search = new Search({...this.data.properties, ...this.data.attributes});
}
async render () {
const data = { label: await this.renderChildren() };
return this.search.render(data);
}
}
SearchLeafDirective.NAME = 'fr-search';
export { SearchLeafDirective };