Skip to content

Commit

Permalink
Direction property
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef committed Oct 3, 2023
1 parent 738a9c2 commit 511f69c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/uui-split-panel/lib/uui-split-panel.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ export class UUISplitPanelElement extends LitElement {
*/
@property({ type: Boolean, reflect: true }) disabled = false;

@property() direction?: 'ltr' | 'rtl';

/**
* If no primary panel is designated, both panels will resize proportionally when the host element is resized. If a
* primary panel is designated, it will maintain its size and the other panel will grow or shrink as needed when the
Expand Down Expand Up @@ -179,7 +181,7 @@ export class UUISplitPanelElement extends LitElement {
}

private handleDrag(event: PointerEvent) {
const isRtl = false; //this.localize.dir() === 'rtl';
const isRtl = this.direction === 'rtl';

if (this.disabled) {
return;
Expand Down Expand Up @@ -276,7 +278,7 @@ export class UUISplitPanelElement extends LitElement {

const gridTemplate = this.vertical ? 'gridTemplateRows' : 'gridTemplateColumns';
const gridTemplateAlt = this.vertical ? 'gridTemplateColumns' : 'gridTemplateRows';
const isRtl = false; //this.localize.dir() === 'rtl';
const isRtl = this.direction === 'rtl';
const primary = `
clamp(
0%,
Expand Down

0 comments on commit 511f69c

Please sign in to comment.