Style the active tab

This commit is contained in:
Oliver Davies 2025-05-30 09:40:51 +01:00
parent a3479a9989
commit bc877f8544

View file

@ -16,4 +16,11 @@
* @ingroup themeable
*/
#}
<li{{ attributes.addClass('me-2') }}>{{ link|add_class('inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-blue-primary hover:border-blue-primary dark:hover:text-gray-300') }}</li>
{% set isActive = element['#active'] %}
{% set classes = [
'inline-block p-4 border-b-2 rounded-t-lg hover:text-blue-primary hover:border-blue-primary dark:hover:text-gray-300',
isActive ? 'text-blue-primary border-blue-primary' : 'border-transparent',
] %}
<li{{ attributes.addClass('me-2') }}>{{ link|add_class(classes|join(' ')) }}</li>