defmodule OopsieDaisy.Components.Rating do @moduledoc """ Rating component with DaisyUI styling. Generated from: tmp/daisyui/packages/docs/src/routes/(routes)/components/rating/+page.md ## Examples <.rating>Content """ use Phoenix.Component # Component attr(:rest, :global, include: ~w(disabled form name value type)) @doc "Additional CSS classes" attr(:class, :string, default: "") @doc "Button size" attr(:size, :atom, default: :md, values: [:md, :xs, :sm, :lg, :xl]) @doc """ Renders a Rating component. """ slot(:inner_block, required: true) def rating(assigns) do ~H"""
<%= render_slot(@inner_block) %>
""" end # Helper functions for class composition defp size_class(nil), do: nil defp size_class(:xs), do: "rating-xs" defp size_class(:sm), do: "rating-sm" defp size_class(:md), do: "rating-md" defp size_class(:lg), do: "rating-lg" defp size_class(:xl), do: "rating-xl" end