Generates a block for the visual editor, with props for the inspector, its render function and a test.
$ mix elementorex.gen.block Pricing
$ mix elementorex.gen.block Marketing.HeroBanner --category layout --container --icon sparkles
Creates lib/my_app_web/blocks/pricing.ex (module MyAppWeb.Blocks.Pricing)
and test/my_app_web/blocks/pricing_test.exs. Register it afterwards:
config :elementorex_cms, blocks: [MyAppWeb.Blocks.Pricing]Options
--type- type stored in documents (default: the snake_case name)--label- name in the palette (default: from the module name)--icon- Heroicons name for the palette (defaultsquare-3-stack-3d)--category-layout,basic,components,media,advancedor your own (defaultcomponents)--container- the block holds child blocks--namespace- module namespace (defaultMyAppWeb.Blocks)--no-test- skip the test--force- overwrite existing files