eratic / packages / core / src / components / Bleed.astro
96 words
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
/**
 * Break something out of the reading column.
 *
 *   <Bleed width="wide">…</Bleed>   → 52rem track
 *   <Bleed width="full">…</Bleed>   → edge to edge
 *
 * Figures and photo grids already take a `width` prop and do not need this.
 * Bleed is for arbitrary content — a diagram, a custom island, a table you
 * want room for.
 */
interface Props {
	width?: 'wide' | 'full';
}

const { width = 'wide' } = Astro.props;
---

<div class:list={[width === 'wide' ? 'u-wide' : 'u-full', 'bleed']}>
	<slot />
</div>

<style>
	.bleed {
		margin-block: var(--space-l);
	}
</style>

static mirror of HEAD · about · clone: git clone https://git.makefuture.ro/eratic.git