Prevent dynamic gap from getting pruned by tailwind

This commit is contained in:
Jonathan Staab 2023-06-02 07:11:00 -07:00
parent 254dcb2547
commit fc39a60805
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@
})
</script>
<Content gap={2}>
<Content gap="gap-2">
{#each $people || [] as person}
<PersonInfo {person} />
{:else}

View File

@ -1,10 +1,10 @@
<script>
import cx from "classnames"
export let gap = 6
export let gap = "gap-6"
export let size = "2xl"
const className = `flex flex-col m-auto text-gray-2 gap-${gap} overflow-hidden`
const className = `flex flex-col m-auto text-gray-2 ${gap} overflow-hidden`
if (!["inherit", "lg", "2xl"].includes(size)) {
throw new Error(`Invalid size: ${size}`)