Skip to content

Commit 08027b2

Browse files
Update data source guide (#25)
1 parent b789166 commit 08027b2

13 files changed

Lines changed: 173 additions & 391 deletions

File tree

src/lib/components/GuideImage.svelte

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
<script lang="ts">
22
export let img: { src: string; alt: string }
3-
export let fullWidth = false
3+
let className = ""
4+
export let fullWidth: boolean = false
5+
export let compact: boolean = false
6+
7+
if (fullWidth) {
8+
className += "full-width "
9+
}
10+
if (compact) {
11+
className += "compact"
12+
}
413
</script>
514

6-
<img class={fullWidth ? "full-width" : ""} src={img.src} alt={img.alt} />
15+
<img class={className} src={img.src} alt={img.alt} />
716

817
<style lang="scss">
918
img {
1019
max-width: 50rem;
20+
&.compact {
21+
max-width: 35rem;
22+
}
1123
&.full-width {
1224
width: 100%;
1325
max-width: none;

0 commit comments

Comments
 (0)