impr: restructure src/lib
This commit is contained in:
376 files changed
+1000
-1033
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<script lang="ts" module>
|
||||
const wrapClass = {
|
||||
wrap: '',
|
||||
'no-wrap': 'overflow-hidden text-ellipsis whitespace-nowrap',
|
||||
force: 'break-words',
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
wrap?: keyof typeof wrapClass
|
||||
class?: string
|
||||
children?: import('svelte').Snippet
|
||||
}
|
||||
|
||||
let { wrap = 'wrap', class: clazz = '', children }: Props = $props()
|
||||
|
||||
let classes = $derived(`${wrapClass[wrap]} ${clazz ?? ''}`)
|
||||
</script>
|
||||
|
||||
<span class={classes}>
|
||||
{@render children?.()}
|
||||
</span>
|
||||
Reference in new issue
Block a user