From bcd572f800bec90b0368921eb5a1ef6a90bdb543 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 17 Oct 2023 14:45:48 +0800 Subject: [PATCH] * zin: add the headerClass property to the tabs widget. --- lib/zin/wg/tabs/v1.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/zin/wg/tabs/v1.php b/lib/zin/wg/tabs/v1.php index ee14c1efd8..8877249664 100644 --- a/lib/zin/wg/tabs/v1.php +++ b/lib/zin/wg/tabs/v1.php @@ -17,6 +17,7 @@ class tabs extends wg /* Tabs direction: h - horizontal, v - vertical */ 'direction?:string="h"', 'collapse?: bool=false', + 'headerClass?:string=""' ); public static function getPageCSS(): string|false @@ -55,12 +56,13 @@ class tabs extends wg */ protected function buildTabHeader(array $titleViews): wg { - $isVertical = $this->prop('direction') === 'v'; - $collapse = $this->prop('collapse'); + $isVertical = $this->prop('direction') === 'v'; + $collapse = $this->prop('collapse'); + $headerClass = $this->prop('headerClass'); return ul ( - setClass('nav nav-tabs gap-x-5', $collapse ? 'relative' : null), + setClass('nav nav-tabs gap-x-5', $collapse ? 'relative' : null, $headerClass ?: null), $isVertical ? setClass('nav-stacked') : null, $titleViews, $this->buildCollapseBtn(),