@@ -43,56 +43,97 @@ to the require section of your `composer.json` file.
4343- ` string $shadow = '' ` - type of loading overlay ('shadow-none', 'shadow-sm', 'shadow', 'shadow-lg')
4444- ` array $tools = [] ` - list of header custom tools (labels, buttons, links)
4545
46- ## How to use
46+ ## TabsCardWidget
4747
48- Use ` CardWidget ` to add your content in adminLTE card
48+ ### Public properties, its types and default values
49+
50+ - ` string $title ` - title of a card
51+ - ` string $color = '' ` - color of a card header (Bootstrap 4 colors. 'success', 'danger' еtс.)
52+ - ` bool $outline = false ` - makes an outlined card
53+ - ` bool $background = false ` - makes a colored card, uses $color property (Bootstrap 4 colors)
54+ - ` bool $gradient = false ` - makes a gradient card, uses $color property (Bootstrap 4 colors)
55+ - ` string $footer = '' ` - content of card footer
56+ - ` string $shadow = '' ` - type of loading overlay ('shadow-none', 'shadow-sm', 'shadow', 'shadow-lg')
57+ - ` array $tabs = [] ` - list of tabs (see an example below)
58+
59+ ## Examples
60+
61+ ### CardWidget
4962
50- ### An example for CardWidget
5163``` php
52- <?php CardWidget::begin([
53- 'title' => 'Some title', // title of a card
54- 'color' => 'dark', // bootstrap color name 'success', 'danger' еtс.
55- 'gradient' => true, // use gradient background
56- 'expand' => true, // show maximize button in card header
57- 'footer' => 'some footer', // content of card footer
58- 'collapse' => true, // show collapse button in card header
59- 'shadow' => 'shadow-sm', // use small shadow
60- 'close' => true, // show close button in card header
61- 'tools' => [ // array with config to add custom labels, buttons or links
64+ <?php CardWidget::begin([
65+ 'title' => 'Some title', // title of a card
66+ 'color' => 'dark', // bootstrap color name 'success', 'danger' еtс.
67+ 'gradient' => true, // use gradient background
68+ 'expand' => true, // show maximize button in card header
69+ 'footer' => 'some footer', // content of card footer
70+ 'collapse' => true, // show collapse button in card header
71+ 'shadow' => 'shadow-sm', // use small shadow
72+ 'close' => true, // show close button in card header
73+ 'tools' => [ // array with config to add custom labels, buttons or links
74+ [
75+ 'label',
76+ 'new',
6277 [
63- 'label',
64- 'new',
65- [
66- 'class' => 'badge badge-primary',
67- 'data-toggle' => 'tooltip',
68- 'title' => 'New',
69- ],
78+ 'class' => 'badge badge-primary',
79+ 'data-toggle' => 'tooltip',
80+ 'title' => 'New',
7081 ],
82+ ],
83+ [
84+ 'link',
85+ '<i class =" fas fa-pencil-alt" aria-hidden =" true" ></i >',
86+ ['update', 'id' => 1],
7187 [
72- 'link',
73- '<i class =" fas fa-pencil-alt" aria-hidden =" true" ></i >',
74- ['update', 'id' => 1],
75- [
76- 'title' => 'Update it',
77- ],
88+ 'title' => 'Update it',
7889 ],
79- [
80- 'button',
81- '<i class =" fas fa-cog" ></i >',
82- [
83- 'class' => 'btn btn-tool',
84- 'title' => 'some tooltip',
85- ],
86- ]
8790 ],
88- ]);
89- ?>
91+ [
92+ 'button',
93+ '<i class =" fas fa-cog" ></i >',
94+ [
95+ 'class' => 'btn btn-tool',
96+ 'title' => 'some tooltip',
97+ ],
98+ ]
99+ ],
100+ ]);
101+ ?>
90102
91- <?php echo 'some content'; ?>
103+ <?= 'some content'; ?>
92104
93- <?php CardWidget::end(); ?>
105+ <?php CardWidget::end(); ?>
94106```
95107
96108### Rendered card
97109
98110![ Rendered card] ( https://code-notes.ru/card_example.png " Rendered card ")
111+
112+ ### TabsCardWidget
113+
114+ ``` php
115+ <?= TabsCardWidget::widget([
116+ 'title' => 'Tabs example',
117+ 'footer' => 'some footer',
118+ 'tabs' => [
119+ [
120+ 'title' => 'Tab1',
121+ 'id' => 'tab_1',
122+ 'content' => 'A wonderful serenity has taken possession of my entire soul,
123+ like these sweet mornings of spring which I enjoy with my whole heart.',
124+ 'active' => true,
125+ ],
126+ [
127+ 'title' => 'Tab2',
128+ 'id' => 'tab_2',
129+ 'content' => 'The European languages are members of the same family. Their separate existence is a myth.
130+ For science, music, sport, etc, Europe uses the same vocabulary.',
131+ ]
132+ ]
133+ ]);
134+ ?>
135+ ```
136+
137+ ### Rendered TabsCard
138+
139+ ![ Rendered TabsCard] ( https://code-notes.ru/tabscard_example.png " Rendered TabsCard ")
0 commit comments