diff --git a/src/applications/uiexample/examples/PHUIXComponentsExample.php b/src/applications/uiexample/examples/PHUIXComponentsExample.php --- a/src/applications/uiexample/examples/PHUIXComponentsExample.php +++ b/src/applications/uiexample/examples/PHUIXComponentsExample.php @@ -72,6 +72,23 @@ 'color' => PHUIButtonView::GREEN, 'text' => pht('Environmental!'), ), + array( + 'icon' => 'fa-cog', + ), + array( + 'icon' => 'fa-cog', + 'type' => PHUIButtonView::BUTTONTYPE_SIMPLE, + ), + array( + 'text' => array('2 + 2', ' ', '=', ' ', '4'), + ), + array( + 'color' => PHUIButtonView::GREY, + 'text' => pht('Cancel'), + ), + array( + 'text' => array(''), + ), ); foreach ($buttons as $spec) { diff --git a/src/view/phui/PHUIButtonView.php b/src/view/phui/PHUIButtonView.php --- a/src/view/phui/PHUIButtonView.php +++ b/src/view/phui/PHUIButtonView.php @@ -5,7 +5,6 @@ const GREEN = 'green'; const GREY = 'grey'; const DISABLED = 'disabled'; - const SIMPLE = 'simple'; const SMALL = 'small'; const BIG = 'big'; @@ -175,7 +174,7 @@ $classes[] = 'has-icon'; } - if (strlen($this->text)) { + if ($this->text !== null) { $classes[] = 'has-text'; } @@ -238,7 +237,7 @@ $this->subtext); } - if (strlen($this->text)) { + if ($this->text !== null) { $text = phutil_tag( 'div', array(