CodeBlock expanding to fit the height of parent container #3833
-
Is there a way to get the CodeBlock component to expand and fit the height of the parent container? Or if not that, is there a way to force the CodeBlock to always display a set number of lines without having to append new lines to the content of the code. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hello @mmacoveiciuc! 👋 I'm Dosu, a friendly bot here to assist with bugs, answer questions, and guide you on contributing while we wait for a human maintainer to join us. I'm taking a look at your issue regarding the CodeBlock component now and will get back to you with a full answer shortly. Let's get this sorted together! |
Beta Was this translation helpful? Give feedback.
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
posting a screenshot to help visualize :) |
Beta Was this translation helpful? Give feedback.
-
Hey @mmacoveiciuc, you're right, the only way to fix the height of the CodeBlock beyond the height of the actual code would be to append blank lines of code to the bottom of your code string. There's no existing |
Beta Was this translation helpful? Give feedback.
Hey @mmacoveiciuc, you're right, the only way to fix the height of the CodeBlock beyond the height of the actual code would be to append blank lines of code to the bottom of your code string. There's no existing
minLines
prop - onlymaxLines
. Thanks!