Skip to content

Commit f127690

Browse files
committed
Add dark mode to Lookbook
1 parent 438290f commit f127690

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

demo/app/views/layouts/preview.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html class="<%= params.dig(:lookbook, :display, :theme) %>">
33
<head>
44
<title><%= content_for(:title) || "Demo" %></title>
55
<meta name="viewport" content="width=device-width,initial-scale=1">
@@ -13,7 +13,7 @@
1313
<%= stylesheet_link_tag :app %>
1414
</head>
1515

16-
<body>
16+
<body class="bg-neutral-primary text-body">
1717
<% if params[:lookbook_embed] %>
1818
<main class="flex p-5">
1919
<%= yield %>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
Rails.application.configure do
22
config.view_component.previews.default_layout = "preview"
3+
4+
config.lookbook.preview_display_options = {
5+
theme: %w[light dark]
6+
}
37
end

0 commit comments

Comments
 (0)