feat: add TextProps component for reusable text modifications
This commit is contained in:
1 parent
21ae0f8272
commit
848992175b
6 files changed
+61
-53
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<script lang="ts" context="module">
|
||||
const wrapClass = {
|
||||
wrap: '',
|
||||
'no-wrap': 'overflow-hidden overflow-ellipsis whitespace-nowrap',
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export let wrap: keyof typeof wrapClass = 'wrap'
|
||||
|
||||
$: classes = `${wrapClass[wrap]} ${$$props.class ?? ''}`
|
||||
</script>
|
||||
|
||||
<span class={classes}>
|
||||
<slot />
|
||||
</span>
|
||||
Reference in new issue
Block a user