diff --git a/js/overrides/tabledrag.js b/js/overrides/tabledrag.js index 90571626318e801579da9be7c7737f720de0c7e7..2e645ec25362fecda518d221c80d057ad4538a18 100644 --- a/js/overrides/tabledrag.js +++ b/js/overrides/tabledrag.js @@ -1813,8 +1813,22 @@ * @return {string} * HTML markup for the weight toggle button content.s */ - toggleButtonContent: (show) => - show ? Drupal.t('Hide row weights') : Drupal.t('Show row weights'), + toggleButtonContent: (show) => { + const classes = [ + 'action-link', + 'action-link--extrasmall', + 'tabledrag-toggle-weight', + ]; + let text = ''; + if (show) { + classes.push('action-link--icon-hide'); + text = Drupal.t('Hide row weights'); + } else { + classes.push('action-link--icon-show'); + text = Drupal.t('Show row weights'); + } + return `<span class="${classes.join(' ')}">${text}</span>`; + }, /** * @return {string}