9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'app/components/satis/tab/component.rb', line 9
def initialize(name = nil,
icon: nil,
badge: nil,
id: nil,
tab_menu: nil,
menu: nil,
padding: false,
dirty: false,
title: nil,
responsive: false,
options: nil,
selected_tab_index: nil,
selected: false,
&block)
super
@name = name
@icon = icon
@id = id || name.to_s.underscore
@badge = badge
@padding = padding
@dirty = dirty
@title = title
@responsive = responsive
@selected = selected
=
if .present?
||=
ActiveSupport::Deprecation.warn('Calling tab with the tab_menu parameter, use menu instead')
end
if selected_tab_index.present?
@selected_tab_index = selected_tab_index
ActiveSupport::Deprecation.warn('Calling tab with the selected_tab_index parameter, use selected instead')
end
@block = block
end
|