Skip to content

Commit

Permalink
Tweaked hide/show UI in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Dec 23, 2022
1 parent 5966e9a commit 8608c27
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
15 changes: 9 additions & 6 deletions packages/react-resizable-panels-website/src/VerticalGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ export function VerticalGroup() {
It uses the <code>minSize</code> prop to prevent it from shrinking
to less than 35% of the total height.
</p>

{isPanelHidden && (
<p className={styles.ParagraphOfText}>
<button className={styles.Button} onClick={showPanel}>
Show the bottom panel
</button>
</p>
<button
className={styles.ButtonBottom}
onClick={showPanel}
id="blah"
>
Show panel
</button>
)}
</div>
</Panel>
Expand All @@ -64,7 +67,7 @@ export function VerticalGroup() {
</p>
<p className={styles.ParagraphOfText}>
<button className={styles.Button} onClick={hidePanel}>
Hide this panel
Hide panel
</button>
</p>
</div>
Expand Down
12 changes: 10 additions & 2 deletions packages/react-resizable-panels-website/src/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@
border-top: 1px solid #4a4c50;
}

.Button {
.Button,
.ButtonBottom {
color: #ffffff;
background: #2a3343;
border: 1px solid #18181a;
border-radius: 0.25rem;
padding: 0.25rem 0.5rem;
cursor: pointer;
}
.Button:hover {
.Button:hover,
.ButtonBottom:hover {
background: #454950;
}

Expand All @@ -93,3 +95,9 @@
.VerticalDot {
background-color: var(--color-vertical);
}

.ButtonBottom {
position: absolute;
bottom: 1ch;
right: 1ch;
}
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
"jsx": "react-jsx"
},
"exclude": ["node_modules"],
"include": [
"declaration.d.ts",
"packages/**/*.ts",
"packages/**/*.tsx"
],
"include": ["declaration.d.ts", "packages/**/*.ts", "packages/**/*.tsx"],
"strict": true,
"target": "es2015"
}

1 comment on commit 8608c27

@vercel
Copy link

@vercel vercel bot commented on 8608c27 Dec 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.