twix icon indicating copy to clipboard operation
twix copied to clipboard

can you add support for arbitrary color?

Open Dylan-aidkr opened this issue 1 year ago • 1 comments

iex(3)> Twix.tw(["text-white", "text-green-500"])
"text-green-500"
iex(4)> Twix.tw(["text-white", "text-[#00ff00]"])
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not an already existing atom

    (erts 14.0) :erlang.binary_to_existing_atom("text-[#00ff00]", :utf8)
    (twix 0.3.0) lib/twix.ex:53: Twix.get_conflicting_class_group_ids/1
    (twix 0.3.0) lib/twix.ex:44: anonymous fn/2 in Twix.handle_conflicts/1
    (elixir 1.15.5) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
    (twix 0.3.0) lib/twix.ex:33: Twix.handle_conflicts/1
    (twix 0.3.0) lib/twix.ex:17: Twix.tw/1
    iex:4: (file)

seems there is no code for arbitrary color value validation

Dylan-aidkr avatar Oct 24 '23 06:10 Dylan-aidkr