We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ad5f6b9 + f127690 commit c89bc21Copy full SHA for c89bc21
demo/app/views/layouts/preview.html.erb
@@ -1,5 +1,5 @@
1
<!DOCTYPE html>
2
-<html>
+<html class="<%= params.dig(:lookbook, :display, :theme) %>">
3
<head>
4
<title><%= content_for(:title) || "Demo" %></title>
5
<meta name="viewport" content="width=device-width,initial-scale=1">
@@ -13,7 +13,7 @@
13
<%= stylesheet_link_tag :app %>
14
</head>
15
16
- <body>
+ <body class="bg-neutral-primary text-body">
17
<% if params[:lookbook_embed] %>
18
<main class="flex p-5">
19
<%= yield %>
demo/config/initializers/lookbook.rb
@@ -1,3 +1,7 @@
Rails.application.configure do
config.view_component.previews.default_layout = "preview"
+
+ config.lookbook.preview_display_options = {
+ theme: %w[light dark]
6
+ }
7
end
0 commit comments