diff --git a/CookieButton.php b/CookieButton.php index 599acfb..f5ea523 100644 --- a/CookieButton.php +++ b/CookieButton.php @@ -65,6 +65,11 @@ class CookieButton extends \yii\bootstrap\Widget */ public $cookie = []; + /** + * @var string the tag to use to render the button + */ + public $buttonTagName = 'button'; + /** * @var string the button type setting (i.e. button or switch). */ @@ -134,6 +139,7 @@ private function renderButton() 'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label, 'encodeLabel' => $this->encodeLabel, 'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options), + 'tagName' => $this->buttonTagName ]); }