Surface.Constructs.If (surface v0.2.0) View Source

Provides an alternative to the :if directive for wrapping multiple elements in an if expression.

Examples

<If condition={{ @display_link }}>
  <Icon name="cheveron_left" />
  <a href={{ @item.to }}>{{ @item.label }}</a>
</If>

Properties

  • condition :boolean, required: true - The condition for the if expression.

Link to this section Summary

Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.

Callback implementation for c:Surface.BaseComponent.transform/1.

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.

Callback implementation for c:Surface.BaseComponent.transform/1.

Callback implementation for Phoenix.LiveComponent.update/2.