Skip to content

Commit

Permalink
fix: Class interpolation in PreviewCodeButton
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-suprunenko committed Oct 5, 2021
1 parent 740aa14 commit 00a9219
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/moon/stateless_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ defmodule Moon.StatelessComponent do
defmacro __using__(_opts) do
quote do
use Surface.Component
import Moon.StatelessComponent
import Moon.Helpers.Styled
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/moon_web/components/example_and_code.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule MoonWeb.Components.ExampleAndCode do
@moduledoc false

use Surface.LiveComponent
use Moon.StatefulComponent

alias Moon.Components.Badge
alias MoonWeb.Components.PreviewCodeButton
Expand All @@ -18,7 +18,7 @@ defmodule MoonWeb.Components.ExampleAndCode do

def render(assigns) do
~F"""
<div class={"rounded-lg p-0 mb-8 #{@class}"}>
<div class={"rounded-lg p-0 mb-8 #{@class}"}>
<PreviewCodeButton
class="justify-end"
title={@title}
Expand Down
2 changes: 1 addition & 1 deletion lib/moon_web/components/preview_code_button.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule MoonWeb.Components.PreviewCodeButton do

def render(assigns) do
~F"""
<div class="flex justify-between items-center my-4 #{@class}">
<div class={"flex justify-between items-center my-4 #{@class}"}>
<Heading class="items-center" size={20} is_regular>{@title}</Heading>
<div class="bg-beerus-100 p-0.5 rounded place-content-center">
<button
Expand Down

0 comments on commit 00a9219

Please sign in to comment.