diff --git a/lib/phlexy_ui/base.rb b/lib/phlexy_ui/base.rb index b876590..e85f5e9 100644 --- a/lib/phlexy_ui/base.rb +++ b/lib/phlexy_ui/base.rb @@ -24,6 +24,7 @@ def register_modifiers(modifiers) def modifiers { + skeleton: :skeleton, **self.class.modifiers, **PhlexyUI.configuration.modifiers.for(component: self.class), **PhlexyUI.configuration.modifiers.for(component: nil) diff --git a/spec/lib/phlexy_ui/button_spec.rb b/spec/lib/phlexy_ui/button_spec.rb index 955d1ee..d636911 100644 --- a/spec/lib/phlexy_ui/button_spec.rb +++ b/spec/lib/phlexy_ui/button_spec.rb @@ -233,6 +233,20 @@ expect(output).to eq(expected_html) end + context "when using the :skeleton modifier" do + subject(:output) do + render described_class.new(:neutral, :skeleton) + end + + it "renders it correctly" do + expected_html = html <<~HTML + + HTML + + expect(output).to eq(expected_html) + end + end + # TODO: Not needed once Phlex 2.0 is released. context "when passing malicious code via the block" do subject(:output) do