Add slug prop to Shop Poster component

This commit is contained in:
2021-10-29 23:45:34 +02:00
parent 141f9c6723
commit a5512ac51e

View File

@@ -1,16 +1,19 @@
<script lang="ts"> <script lang="ts">
import Button from '$components/atoms/Button.svelte'; import Button from '$components/atoms/Button.svelte'
export let slug: string
</script> </script>
<div class="poster"> <div class="poster">
<img src="https://picsum.photos/326/475" width={326} height={475} alt="blob"> <img src="https://picsum.photos/326/475" width={326} height={475} alt="blob">
<div class="buttons"> <div class="buttons">
<Button <Button
text="View poster"
size="xsmall" size="xsmall"
url="/shop/poster-{slug}"
text="View poster"
/> />
<Button <Button
type="button"
text="Add to cart" text="Add to cart"
color="pink" color="pink"
size="xsmall" size="xsmall"