Skip to content

Instantly share code, notes, and snippets.

@AndyObtiva
Created September 18, 2025 06:25
Show Gist options
  • Select an option

  • Save AndyObtiva/28d4396a0876cb4cedf1717087556cb0 to your computer and use it in GitHub Desktop.

Select an option

Save AndyObtiva/28d4396a0876cb4cedf1717087556cb0 to your computer and use it in GitHub Desktop.
class AddressTypeSelect
include Glimmer::Web::Component
attribute :address_types, default: []
attribute :selected_address_type
markup {
select { |select_element|
address_types.each do |address_type|
option(value: address_type) { address_type }
end
value <=> [self, :selected_address_type]
}
}
style {
r(component_element_selector) {
font_size 2.em
margin_left 5.px
}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment