diff --git a/src/Bootstrapper/DropdownButton.php b/src/Bootstrapper/DropdownButton.php index 4292ac14..9310ceea 100644 --- a/src/Bootstrapper/DropdownButton.php +++ b/src/Bootstrapper/DropdownButton.php @@ -91,6 +91,11 @@ class DropdownButton extends RenderedObject * @var bool Whether the button should drop up */ protected $dropup = false; + + /** + * @var bool Whether the menu should align right + */ + protected $alignRight = false; /** * Set the label of the button @@ -167,6 +172,18 @@ public function dropup() return $this; } + + /** + * Sets the dropdown menu align right + * + * @return $this + */ + public function alignRight() + { + $this->alignRight = true; + + return $this; + } /** * Creates a normal dropdown button @@ -323,7 +340,13 @@ public function render() $string .= ""; } - $string .= "