# app/components/phlex_component.rb
class PhlexComponent < Phlex::HTML
  def initialize(field:, **)
    @field = field
  end

  def view_template
    div class: "flex items-center px-6 py-4" do
      span class: "font-semibold text-gray-500 text-sm w-64 uppercase" do
        @field.name
      end
      span class: "text-gray-900" do
        @field.value
      end
      span class: "text-gray-300 mx-3" do
        "|"
      end
      span class: "mr-1" do
        "ℹ️"
      end
      span class: "text-sm text-gray-500 italic" do
        "This is a unique course link. Share it with enrolled users."
      end
    end
  end
end
```

---

## Step 2: Use the component in your field declaration

With the `components` option, you can specify the component to be used for the `show` view of a field.

```ruby{10-12}