Add switch to management component for essentials cookies

This commit is contained in:
taitus
2024-11-29 15:47:22 +01:00
parent c95c80dc32
commit 390c749d24
5 changed files with 44 additions and 0 deletions

View File

@@ -30,4 +30,34 @@
}
}
}
.cookies-essentials {
ul {
list-style: none;
margin-#{$global-left}: 0;
li {
display: flex;
gap: $line-height;
justify-content: space-between;
padding: $line-height / 3;
&:nth-child(odd) {
background: #efefef;
}
}
}
.switch {
margin-top: $line-height / 3;
&:focus-within {
@include focus-outline;
}
}
p {
margin-bottom: 0;
}
}
}

View File

@@ -12,6 +12,17 @@
<h3><%= t("cookies_management.essentials.title") %></h3>
<p><%= t("cookies_management.essentials.description") %></p>
<div class="cookies-essentials">
<ul>
<li>
<%= render Layout::CookiesConsent::SwitchComponent.new(:essential_cookies,
label: t("cookies_management.essentials.title"),
description: t("cookies_management.essentials.hint"),
checked: true,
disabled: true) %>
</li>
</ul>
</div>
<div class="buttons">
<button type="button" class="accept-essential-cookies"><%= t("cookies_consent.accept_essential_cookies") %></button>