defmodule LivebookWeb.SessionLive.SecretsComponent do use LivebookWeb, :live_component @impl true def update(assigns, socket) do socket = assign(socket, assigns) socket = if socket.assigns[:data] do socket else assign(socket, data: %{"name" => prefill_secret_name(socket), "value" => ""}) end {:ok, socket} end @impl true def render(assigns) do ~H"""
Choose a secret
Add new secret
<% end %> <.input_wrapper form={f} field={:name}>