PhoenixKitLocations.Web.Components.FilesCard (PhoenixKitLocations v0.3.0)

Copy Markdown View Source

Reusable Files + Featured Image card body. Renders the same UI for Location, floors, and rooms — each instance scoped by the scope attr, which is forwarded as phx-value-scope on every event button. The single shared upload config is owned by the parent LiveView; each dropzone here also sets :active_upload_scope on click so the upload routes to the right folder.

Summary

Functions

files_card_body(assigns)

Attributes

  • scope (:string) (required)
  • state (:map) (required) - Map from Attachments.state/2.
  • uploads (:map) (required)
  • featured_subtitle (:string) - Defaults to nil.
  • files_subtitle (:string) - Defaults to nil.
  • remove_file_confirm (:string) - Defaults to nil.