Use TextBlock elements in file previews
This commit is contained in:
20
svelte/src/file_viewer/viewers/TextBlock.svelte
Normal file
20
svelte/src/file_viewer/viewers/TextBlock.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script>
|
||||
export let width = "800px"
|
||||
</script>
|
||||
|
||||
<div class="block" style="max-width: {width};">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.block {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
padding-left: 8px;
|
||||
vertical-align: middle;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 16px;
|
||||
padding: 8px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user