Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions packages/mq-playground/src/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ export const Playground = () => {
{!isEmbed && (
<header className="playground-header">
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
{isOPFSSupported && isDesktop() && (
{isOPFSSupported && (
<button
className="header-icon-button"
onClick={toggleSidebar}
Expand Down Expand Up @@ -1609,9 +1609,9 @@ export const Playground = () => {
)}

<div className="playground-content" ref={contentRef}>
{isOPFSSupported && isSidebarVisible && isDesktop() && (
{isOPFSSupported && isSidebarVisible && (
<>
<div className="file-tree-panel" style={{ width: sidebarWidth }}>
<div className="file-tree-panel" style={isDesktop() ? { width: sidebarWidth } : undefined}>
<FileTree
files={files}
onFileSelect={handleFileSelect}
Expand All @@ -1624,10 +1624,12 @@ export const Playground = () => {
selectedFile={selectedFile}
/>
</div>
<ResizeHandle
direction="horizontal"
onResize={handleSidebarResize}
/>
{isDesktop() && (
<ResizeHandle
direction="horizontal"
onResize={handleSidebarResize}
/>
)}
</>
)}
<div
Expand Down Expand Up @@ -1909,7 +1911,8 @@ export const Playground = () => {
)}
{activeTab === "ast" && (
<button className="button" onClick={handleGenerateAst}>
Generate AST
<VscSymbolMethod size={14} />
<span>Generate AST</span>
</button>
)}
</div>
Expand Down
19 changes: 19 additions & 0 deletions packages/mq-playground/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,25 @@ body {
padding: 3px 8px;
font-size: 0.75rem;
}

.button span {
display: none;
}

.button {
padding: 4px;
gap: 0;
}

.run-button {
padding: 4px 8px;
}

.file-tree-panel {
width: 100%;
height: 300px;
border-bottom: 1px solid var(--tree-border);
}
}

.dropdown {
Expand Down
Loading