mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Allow setting of button colors in headers
Summary: We currently override button color for headers, since the default is blue, but if a developer sets a specific color, we should respect that. Test Plan: Set a button in the header to green and see green. See grey everywhere else. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17922
This commit is contained in:
parent
422eb9db83
commit
6ecd6980a1
2 changed files with 7 additions and 1 deletions
|
@ -64,6 +64,10 @@ final class PHUIButtonView extends AphrontTagView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
public function setDisabled($disabled) {
|
||||
$this->disabled = $disabled;
|
||||
return $this;
|
||||
|
|
|
@ -267,7 +267,9 @@ final class PHUIHeaderView extends AphrontTagView {
|
|||
if ($this->actionLinks) {
|
||||
$actions = array();
|
||||
foreach ($this->actionLinks as $button) {
|
||||
if (!$button->getColor()) {
|
||||
$button->setColor(PHUIButtonView::GREY);
|
||||
}
|
||||
$button->addClass(PHUI::MARGIN_SMALL_LEFT);
|
||||
$button->addClass('phui-header-action-link');
|
||||
$actions[] = $button;
|
||||
|
|
Loading…
Reference in a new issue