Skip to content

Commit cb118f2

Browse files
committed
Responsive Chain
1 parent c6c5774 commit cb118f2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

apps/web/content/blog/build-time-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ And since we are not using the _`function scrape()`_ anymore, the _`import { scr
429429

430430
## !!steps
431431

432-
```jsx ! out/app/page.js
432+
```jsx ! out/app/page.js -w
433433
import { LinkWithCard } from "./card"
434434

435435
export default function Page() {

apps/web/content/blog/build-time-components.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export function Chain(props: unknown) {
2323
}),
2424
)
2525
return (
26-
<section className="grid grid-cols-2 grid-flow-col gap-2 md:-mx-10 lg:-mx-32 mt-2">
26+
<section className="md:grid grid-cols-2 grid-flow-col gap-2 md:-mx-10 lg:-mx-32 mt-2">
2727
<div className="col-start-2 flex">
2828
{intro && (
2929
<>
3030
<Arrow intro />
31-
<div className=" self-center flex-1">{intro?.children}</div>
31+
<div className=" self-center flex-1 min-w-0">{intro?.children}</div>
3232
</>
3333
)}
3434
</div>
@@ -42,14 +42,18 @@ export function Chain(props: unknown) {
4242
{step.this && (
4343
<>
4444
<Arrow />
45-
<div className=" self-center flex-1">{step.this.children}</div>
45+
<div className=" self-center flex-1 min-w-0">
46+
{step.this.children}
47+
</div>
4648
</>
4749
)}
4850
</div>
4951
{i < steps.length - 1 && (
5052
<div className="col-start-2 row-span-2 flex">
5153
<Arrow />
52-
<div className=" self-center flex-1">{step.next?.children}</div>
54+
<div className=" self-center flex-1 min-w-0">
55+
{step.next?.children}
56+
</div>
5357
</div>
5458
)}
5559
</>
@@ -61,7 +65,7 @@ export function Chain(props: unknown) {
6165

6266
function Arrow({ intro }: { intro?: boolean }) {
6367
return (
64-
<div className="h-full mr-3 flex-col w-5 flex">
68+
<div className="h-full mr-3 flex-col w-5 hidden md:flex">
6569
{!intro && <div className="h-2 bg-zinc-500/50 rounded-se-2xl mt-6" />}
6670
<div className="flex-1 w-2 bg-zinc-500/50 self-end" />
6771
<div className="h-2 bg-zinc-500/50 rounded-ee-2xl ml-2 mb-6">

0 commit comments

Comments
 (0)