Current section
Files
Jump to
Current section
Files
lib/components/tag.ex
defmodule LiveAntd.Components.Tag do
@moduledoc """
Tag for categorizing or markup.
"""
use Surface.Component
prop(class, :string)
prop(style, :string)
# prop(color, :string, values: ~w(red green cyan purple))
prop(color, :string)
def render(assigns) do
~H"""
<span
class={{
"ant-tag",
@class,
"ant-tag-#{@color}": @color
}}
style="{{ @style }}"
>
<slot />
</span>
"""
end
end