From 1f7164c06713e914c180f1bc3e36357b7240abea Mon Sep 17 00:00:00 2001 From: shahryar tavakkoli Date: Mon, 6 Mar 2023 00:22:22 +0330 Subject: [PATCH] add entry view after selecting a setting, based on #4 , #44 --- .../components/blocks/content.ex | 2 +- .../components/blocks/settings.ex | 54 ++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/lib/mishka_template_creator/components/blocks/content.ex b/lib/mishka_template_creator/components/blocks/content.ex index 69b0173..93a428c 100644 --- a/lib/mishka_template_creator/components/blocks/content.ex +++ b/lib/mishka_template_creator/components/blocks/content.ex @@ -4,7 +4,7 @@ defmodule MishkaTemplateCreator.Components.Blocks.Content do attr :elemens, :list, required: true attr :selected_block, :string, required: true - attr :selected_setting, :string, required: true + attr :selected_setting, :map, required: true attr :submit, :string, required: true @spec content(map) :: Phoenix.LiveView.Rendered.t() diff --git a/lib/mishka_template_creator/components/blocks/settings.ex b/lib/mishka_template_creator/components/blocks/settings.ex index 218d08b..19862d1 100644 --- a/lib/mishka_template_creator/components/blocks/settings.ex +++ b/lib/mishka_template_creator/components/blocks/settings.ex @@ -70,9 +70,61 @@ defmodule MishkaTemplateCreator.Components.Blocks.Settings do OR put your custom classes
+ You can change the default setting of + + <%= Map.get(@selected_setting, "id") %> + +
+ <%= Map.get(@selected_setting, "id") %> +