create component for sidemenu and add locales for raw text

This commit is contained in:
Lisa Durand 2023-03-20 17:50:05 +01:00
parent 4a2982dc37
commit a01564adcd
13 changed files with 126 additions and 76 deletions

View file

@ -0,0 +1,15 @@
class Dsfr::SidemenuComponent < ApplicationComponent
renders_many :links, "LinkComponent"
class LinkComponent < ApplicationComponent
attr_reader :name, :url
def initialize(name:, url:)
@name = name
@url = url
end
end
def active?(url)
current_page?(url)
end
end