16 lines
327 B
Svelte
16 lines
327 B
Svelte
<script lang="ts">
|
|
export let value: string;
|
|
export let title: string | undefined = undefined;
|
|
</script>
|
|
|
|
<div class="ellipsis" title={title || value}><slot>{value}</slot></div>
|
|
|
|
<style lang="scss">
|
|
.ellipsis {
|
|
max-width: 100%;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|