Renders a primary button component with optional loading state.
Examples
<.primary>Submit</.primary>
<.primary loading={true} phx_click="save" disabled={@form_invalid}>
Save Changes
</.primary>
<.primary icon="<svg>...</svg>">
With Icon
</.primary>
Options
:type
- Button type attribute (optional, defaults to "button"):class
- Additional CSS classes (optional):disabled
- Whether the button is disabled (optional, defaults to false):loading
- Whether to show loading state (optional, defaults to false):icon
- HTML string for an icon to display before text (optional):phx_click
- The LiveView click event to trigger (optional):phx_value_id
- The id value to pass with the event (optional):phx_target
- The LiveView target for the event (optional)