Skip to content

Commit

Permalink
Make grow a prop for CodeBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tideman committed Dec 4, 2024
1 parent e2532bc commit b203e7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
maxHeight={300}
grow={false}
/>
{/each}
</PayloadDecoder>
Expand All @@ -45,6 +46,7 @@
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
maxHeight={300}
grow={false}
/>
</PayloadDecoder>
{/if}
Expand All @@ -54,6 +56,7 @@
language="text"
copyable={false}
maxHeight={300}
grow={false}
/>
{/if}
</div>
4 changes: 3 additions & 1 deletion src/lib/holocene/code-block.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
language?: 'json' | 'text' | 'shell';
editable?: boolean;
inline?: boolean;
grow?: boolean;
testId?: string;
copyable?: boolean;
minHeight?: number;
Expand All @@ -56,6 +57,7 @@
export { className as class };
export let editable = false;
export let inline = false;
export let grow = true;
export let language = 'json';
export let copyable = true;
export let copyIconTitle = '';
Expand Down Expand Up @@ -188,7 +190,7 @@
$: content, language, setView();
</script>

<div class="relative min-w-[80px] grow">
<div class:grow class="relative min-w-[80px]">
<div
bind:this={editor}
class={className}
Expand Down

0 comments on commit b203e7a

Please sign in to comment.