fix(champ_component): enable preview
This commit is contained in:
parent
6e255489a5
commit
362c220587
3 changed files with 25 additions and 2 deletions
|
@ -16,9 +16,10 @@
|
|||
= vite_client_tag
|
||||
= vite_javascript_tag 'application'
|
||||
|
||||
= preload_link_tag(asset_url("Muli-Regular.woff2"))
|
||||
= preload_link_tag(asset_url("Muli-Bold.woff2"))
|
||||
= preload_link_tag(asset_url("Marianne-Regular.woff2"))
|
||||
= preload_link_tag(asset_url("Spectral-Regular.ttf"))
|
||||
|
||||
= vite_stylesheet_tag 'main', media: 'all'
|
||||
= stylesheet_link_tag 'application', media: 'all'
|
||||
|
||||
%body{ class: browser.platform.ios? ? 'ios' : nil }
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
class TypesDeChampEditor::ChampComponentPreview < ViewComponent::Preview
|
||||
include Logic
|
||||
|
||||
def nominal
|
||||
tdc = TypeDeChamp.new(type_champ: 'text', stable_id: 123)
|
||||
procedure = Procedure.new(id: 123)
|
||||
coordinate = ProcedureRevisionTypeDeChamp.new(type_de_champ: tdc, procedure:)
|
||||
upper_coordinates = []
|
||||
|
||||
render_with_template(locals: {
|
||||
coordinate:,
|
||||
upper_coordinates:
|
||||
})
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
%main
|
||||
.container
|
||||
.types-de-champ-editor
|
||||
%ul.types-de-champ-block
|
||||
= render TypesDeChampEditor::ChampComponent.new(coordinate:,
|
||||
upper_coordinates:,
|
||||
focused: false)
|
Loading…
Add table
Reference in a new issue