@@ -3,7 +3,7 @@ defmodule MishkaTemplateCreatorWeb.MishkaCoreComponent do
3
3
import Phoenix.HTML.Form
4
4
import MishkaTemplateCreatorWeb.CoreComponents
5
5
alias MishkaTemplateCreator.Data.TailwindSetting
6
- alias MishkaTemplateCreator.Components.Blocks . { Content , Aside , History }
6
+ alias MishkaTemplateCreator.Components.Layout . { Content , Aside , History }
7
7
alias Phoenix.LiveView.JS
8
8
alias MishkaTemplateCreator.Data.Elements
9
9
@@ -212,49 +212,6 @@ defmodule MishkaTemplateCreatorWeb.MishkaCoreComponent do
212
212
"""
213
213
end
214
214
215
- attr ( :module , :string , required: true )
216
- attr ( :class , :string , required: false , default: "w-6 h-6 mx-auto stroke-current" )
217
-
218
- def dynamic_icon ( assigns ) do
219
- ~H"""
220
- <%= Phoenix.LiveView.TagEngine . component (
221
- Code . eval_string ( "&(#{ @ module } /1)" ) |> elem ( 0 ) ,
222
- [ class: @ class ] ,
223
- { __ENV__ . module , __ENV__ . function , __ENV__ . file , __ENV__ . line }
224
- ) %>
225
- """
226
- end
227
-
228
- attr ( :class , :string ,
229
- required: false ,
230
- default: "w-4 h-4 mx-auto stroke-current text-black cursor-pointer"
231
- )
232
-
233
- attr ( :myself , :integer , required: true )
234
- attr ( :selected , :string , required: false , default: nil )
235
- attr ( :block_id , :string , required: false , default: nil )
236
-
237
- def select_icons ( assigns ) do
238
- assigns = assign ( assigns , icons: TailwindSetting . hero_icons ( ) )
239
-
240
- ~H"""
241
- < div class = "flex flex-wrap w-full gap-1 border border-gray-300 p-3 rounded-md mb-3 justify-start " >
242
- < span
243
- :for = { icon <- @ icons }
244
- phx-click = "select_icon "
245
- phx-value-name = { icon }
246
- phx-value-block-id = { @ block_id }
247
- phx-target = { @ myself }
248
- >
249
- < . dynamic_icon
250
- module = { "Heroicons.#{ icon } " }
251
- class = { @ class <> "#{ if @ selected == icon , do: " !text-red-600" , else: "" } " }
252
- />
253
- </ span >
254
- </ div >
255
- """
256
- end
257
-
258
215
attr ( :myself , :integer , required: true )
259
216
attr ( :classes , :list , required: true )
260
217
attr ( :title , :string , required: false , default: "Color:" )
0 commit comments