Skip to content

Commit ebfb574

Browse files
authored
Merge pull request #1 from dmstr/feature/customizable-button-tag-name
button tag name
2 parents 0ee34e4 + d220f43 commit ebfb574

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CookieButton.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ class CookieButton extends \yii\bootstrap\Widget
6565
*/
6666
public $cookie = [];
6767

68+
/**
69+
* @var string the tag to use to render the button
70+
*/
71+
public $buttonTagName = 'button';
72+
6873
/**
6974
* @var string the button type setting (i.e. button or switch).
7075
*/
@@ -134,6 +139,7 @@ private function renderButton()
134139
'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label,
135140
'encodeLabel' => $this->encodeLabel,
136141
'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options),
142+
'tagName' => $this->buttonTagName
137143
]);
138144
}
139145

0 commit comments

Comments
 (0)