Add toggleLintPanel to alternate state. #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "gburtini/add-toggle-export"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
openLintPanelandcloseLintPaneldo not seem to provide any indicator of whether the lint panel is open.I considered trying to export some of the state fields themselves, so a consumer of the API could query, say,
getPanel(view, LintPanel.open), but my actual use case only requires a toggle method and the encapsulation seems simpler this way.This may not be quite as you intend, especially with respect to returning the handled boolean, but I'm happy to shepherd it until it is appropriate. If you'd prefer I try to export some useful state instead, I'm happy to go about that.
You can implement this without modifying the library as
toggleLintPanel = view => closeLintPanel(view) || openLintPanel(view)Pull request closed