You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title. It's possible to hide all of the default buttons in SandpackPreview thanks to props like showRefreshButton, but there is no equivalent for SandpackConsole. Notably, adding a custom button is already possible because, just like SandpackPreview, SandpackConsole accepts actionsChildren and the default button just invokes a function that is already exposed through a hook (specifically, useSandpackConsole's reset()).
Packages affected
sandpack-client
sandpack-react
What is this feature?
A new prop for SandpackConsole: showClearButton: boolean = false
How would your idea work?
When showClearButton is set to false (default), SandpackConsole renders as normal. When showClearButton is set to true, SandpackConsole does not render the circular button that, when clicked,
Do you have any examples of how you would like to see us implement it?
It should be a fairly straightforward addition to SandpackConsole, plus any desired testing and/or mocking.
Note: I am willing to submit a PR should one be desired! I just want to make sure that this feature request is seen as desired first.
The text was updated successfully, but these errors were encountered:
Tell us how you think we can improve Sandpack
Title. It's possible to hide all of the default buttons in
SandpackPreview
thanks to props likeshowRefreshButton
, but there is no equivalent forSandpackConsole
. Notably, adding a custom button is already possible because, just likeSandpackPreview
,SandpackConsole
acceptsactionsChildren
and the default button just invokes a function that is already exposed through a hook (specifically,useSandpackConsole
'sreset()
).Packages affected
What is this feature?
A new
prop
forSandpackConsole
:showClearButton: boolean = false
How would your idea work?
When
showClearButton
is set tofalse
(default),SandpackConsole
renders as normal. WhenshowClearButton
is set totrue
,SandpackConsole
does not render the circular button that, when clicked,Do you have any examples of how you would like to see us implement it?
It should be a fairly straightforward addition to SandpackConsole, plus any desired testing and/or mocking.
Note: I am willing to submit a PR should one be desired! I just want to make sure that this feature request is seen as desired first.
The text was updated successfully, but these errors were encountered: