From fd57acc9cae81ceffe8733583e7cf176d693d9ec Mon Sep 17 00:00:00 2001 From: Benjamin von Polheim Date: Tue, 6 Dec 2022 07:18:43 +0100 Subject: [PATCH] support more than two variants --- lib/cva/component.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cva/component.ex b/lib/cva/component.ex index 9f36846..3e6e851 100644 --- a/lib/cva/component.ex +++ b/lib/cva/component.ex @@ -116,7 +116,7 @@ defmodule CVA.Component do defmacro variant(name, variants, opts \\ []) when is_atom(name) and is_list(variants) and is_list(opts) do quote do - if Module.get_attribute(__MODULE__, :__cva_variant_called__) do + unless Module.get_attribute(__MODULE__, :__cva_variant_called__) do attr(:cva_class, :string, default: nil) end