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
18 changes: 15 additions & 3 deletions packages/split-view/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ import { SplitView } from '@spectrum-web-components/split-view';
### Horizontal Resizable

```html
<sp-split-view resizable primary-min="50" secondary-min="50" primary-size="100">
<sp-split-view
resizable
primary-min="50"
secondary-min="50"
primary-size="100"
label="Resize the horizontal panels"
>
<div>
<h1>Left panel</h1>
<p>
Expand All @@ -59,7 +65,7 @@ import { SplitView } from '@spectrum-web-components/split-view';
### Horizontal Resizable & Collapsible

```html
<sp-split-view resizable>
<sp-split-view resizable label="Resize the horizontal collapsible panels">
<div>
<h1>Left panel</h1>
<p>
Expand Down Expand Up @@ -95,6 +101,7 @@ import { SplitView } from '@spectrum-web-components/split-view';
primary-min="50"
primary-max="150"
secondary-min="50"
label="Resize the vertical panels"
>
<div>
<h1>Top panel</h1>
Expand All @@ -116,7 +123,12 @@ import { SplitView } from '@spectrum-web-components/split-view';
### Vertical Resizable & Collapsible

```html
<sp-split-view vertical resizable style="height: 300px;">
<sp-split-view
vertical
resizable
style="height: 300px;"
label="Resize the vertical collapsible panels"
>
<div>
<h1>Top panel</h1>
<p>
Expand Down
2 changes: 1 addition & 1 deletion packages/split-view/src/SplitView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class SplitView extends SpectrumElement {
)) as boolean,
};
const label =
this.label || this.resizable ? 'Resize the panels' : undefined;
this.label || (this.resizable ? 'Resize the panels' : undefined);

return html`
<slot
Expand Down