claro-8.x-1.x-dev/js/theme.es6.js
js/theme.es6.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | /** * @file * Theme overrides for Claro. */ (Drupal => { /** * Constucts a checkbox input element. * * @return {string} * A string representing a DOM fragment. */ Drupal.theme.checkbox = () => '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>' ; /** * Overrides the dropbutton toggle markup. * * We have to keep the 'dropbutton-toggle' CSS class because the dropbutton JS * operates with that one. * * @param {object} options * Options object. * @param {string} [options.title] * The button text. * * @return {string} * A string representing a DOM fragment. */ Drupal.theme.dropbuttonToggle = options => `<li class= "dropbutton-toggle" ><button type= "button" class= "dropbutton__toggle" ><span class= "visually-hidden" >${options.title}</span></button></li>`; })(Drupal); |