Skip to content

Commit 158cb70

Browse files
djalmaaraujoDjalma Andrade
authored andcommitted
style(docs): align preview and docs layout with web
1 parent 307f0b8 commit 158cb70

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/components/docs/visual_code_example.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ def render_preview_tab(&block)
7878
end
7979

8080
def iframe_preview
81-
div(class: "relative aspect-[4/2.5] w-full overflow-hidden rounded-md border", data: {controller: "iframe-theme"}) do
82-
div(class: "absolute inset-0 hidden w-[1600px] bg-background md:block") do
81+
div(class: "relative min-h-[500px] w-full overflow-hidden rounded-md border", data: {controller: "iframe-theme"}) do
82+
div(class: "absolute inset-0 hidden w-full bg-background md:block") do
8383
iframe(src: @src, class: "size-full", data: {iframe_theme_target: "iframe"})
8484
end
8585
end
8686
end
8787

8888
def raw_preview
8989
div(class: "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border") do
90-
div(class: "preview flex min-h-[350px] w-full justify-center p-10 items-center") do
90+
div(class: "preview min-h-[350px] w-full p-6") do
9191
decoded_code = CGI.unescapeHTML(@display_code)
9292
@context.instance_eval(decoded_code)
9393
end

app/views/layouts/docs_layout.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def view_template(&block)
1717
div(class: "border-b") do
1818
div(class: "container px-4 flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10") do
1919
render Shared::Sidebar.new
20-
main(class: "relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]", &block)
20+
main(class: "relative py-6 lg:py-8 w-full min-w-0", &block)
2121
end
2222
end
2323
end

0 commit comments

Comments
 (0)