29 lines
435 B
Ruby
29 lines
435 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Widgets
|
|
class Sidebar < Container
|
|
def initialize(_parent)
|
|
super
|
|
|
|
@logo = Logo.new self
|
|
@menu = Menu.new self
|
|
end
|
|
|
|
def focus
|
|
case props[:focus]
|
|
when :menu
|
|
@menu
|
|
end
|
|
end
|
|
|
|
def props=(_value)
|
|
super
|
|
@logo.props = props[:logo]
|
|
@menu.props = props[:menu]
|
|
end
|
|
|
|
def children
|
|
[@logo, @menu]
|
|
end
|
|
end
|
|
end
|