diff --git a/zin/wg/actionitem/v1.php b/zin/wg/actionitem/v1.php index e68d5b76b0..3f031b0ef4 100644 --- a/zin/wg/actionitem/v1.php +++ b/zin/wg/actionitem/v1.php @@ -1,13 +1,44 @@ prop('icon', 'text', 'trailingIcon'); + + return h::span + ( + set($text), + set($this->props->skip(array_keys(actionItem::getDefinedProps()))), + $icon ? icon($icon) : NULL, + $this->children(), + $trailingIcon ? icon($trailingIcon) : NULL, + ); + } + + protected function buildBtnItem() + { + return new btn($this->props->skip('tagName,type,name,outerTag,outerProps')); + } + protected function buildItem() { + $type = $this->prop('type'); + $methodName = "build{$type}Item"; + if(method_exists($this, $methodName)) return $this->$methodName(); + list($tagName, $icon, $text, $trailingIcon) = $this->prop('tagName', 'icon', 'text', 'trailingIcon'); + return h::create ( $tagName,