Releases: stephannv/phlex-slotable
Releases · stephannv/phlex-slotable
v0.5.0
v0.4.0
What's Changed
- Rename 'many' option to 'collection' by @stephannv in #6
- Improve docs by @stephannv in #7
- Improve generic slot performance by @stephannv in #8
Full Changelog: v0.3.1...v0.4.0
v0.3.1
v0.3.0
What's Changed
-
Match DeferredRender in performance by @stephannv in #3
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23] Warming up -------------------------------------- Deferred 26.779k i/100ms Slotable 0.2.0 21.636k i/100ms Slotable 0.3.0 27.013k i/100ms Calculating ------------------------------------- Deferred 267.884k (± 0.6%) i/s - 1.366M in 5.098391s Slotable 0.2.0 216.193k (± 0.4%) i/s - 1.082M in 5.003961s Slotable 0.3.0 270.082k (± 0.5%) i/s - 1.351M in 5.001001s
-
Allow polymorphic slots by @stephannv in #4
class CardComponent < Phlex::HTML include Phlex::Slotable slot :avatar, types: { icon: IconComponent, image: ImageComponent } def template if avatar_slot? render avatar_slot end end end render CardComponent.new do |card| if user card.with_image_avatar(src: user.image_url) else card.with_icon_avatar(name: :user) end end
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- Allow string as class name by @stephannv in #1
- Add lambda slots by @stephannv in #2
New Contributors
- @stephannv made their first contribution in #1
Full Changelog: v0.1.0...v0.2.0