aki / yii2-make-button
For make button
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Language:CSS
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-13 11:43:01 UTC
README
For make button
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require aki/yii2-make-button "*"
or add
"aki/yii2-make-button": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \aki\button\MakeButton::widget([ 'text' => '<i class="fa fa-edit"></i> hello', ]); ?>
also create ajax request sample :
<?= aki\button\MakeButton::widget([ 'text' => '<i class="fa fa-edit"></i> hello', 'ajax' => [ 'onSendRequest' => 'click', 'url' => Url::toRoute(['post/index']), 'type' => 'POST', 'success' => new yii\web\JsExpression(' function(data){ alert(data); } '), 'data' => new yii\web\JsExpression("datafrom('#form')"), ] ]);?>
also diffrent skin exists
styles :
bootstrap
createive
set skin creative
<?= aki\button\MakeButton::widget([ 'text' => '<span>Add to cart</span>', 'skin' => 'creative', 'options' => [ 'class' => aki\button\MakeButton::style()->creative->btn3e_send ], ]);?>