defmodule Corex.DataList do @moduledoc ~S''' Renders a list with data based on Phoenix Core Components. ''' @doc type: :component use Phoenix.Component attr(:rest, :global, doc: "Additional attributes for the root element") @doc """ Renders a list with data. ## Examples <.data_list> <:item title="Title">{@post.title} <:item title="Views">{@post.views} """ slot :item, required: true do attr(:title, :string, required: true) attr(:class, :string, required: false) end def data_list(assigns) do ~H"""