Sha256: 4ea38424294b603d543e12e8e68518a0166ffca3b84ad4f60360b0ddcc3af125
Contents?: true
Size: 901 Bytes
Versions: 14
Compression:
Stored size: 901 Bytes
Contents
class Nav < Hyperloop::Component before_mount do mutate.user_name_input '' end render do div.navbar.navbar_inverse.navbar_fixed_top do div.container do div.collapse.navbar_collapse(id: 'navbar') do form.navbar_form.navbar_left(role: :search) do div.form_group do input.form_control(type: :text, value: state.user_name_input, placeholder: "Enter Your Handle" ).on(:change) do |e| mutate.user_name_input e.target.value end button.btn.btn_default(type: :button) { "login!" }.on(:click) do Operations::Join(user_name: state.user_name_input) end if valid_new_input? end end end end end end def valid_new_input? state.user_name_input.present? && state.user_name_input != MessageStore.user_name end end
Version data entries
14 entries across 14 versions & 2 rubygems