From 3a03a5fa6b3a4d1458a09594b328e5b5793fa505 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Mon, 4 Dec 2023 09:44:57 +0100 Subject: [PATCH 1/2] flexDirection --- src/tabs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tabs.ts b/src/tabs.ts index fd2d62b2..034ac529 100644 --- a/src/tabs.ts +++ b/src/tabs.ts @@ -182,7 +182,7 @@ export function tabWidget (options: TabWidgetOptions) { const rootElement: TabWidgetElement = dom.createElement('div') // 20200117a rootElement.setAttribute('style', style.tabsRootElement) - rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';') + rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse' : '') const navElement = rootElement.appendChild(dom.createElement('nav')) navElement.setAttribute('style', style.tabsNavElement) From 9860a9c06ad29c66d8081aa156be4d45f8607983 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Mon, 4 Dec 2023 10:53:35 +0100 Subject: [PATCH 2/2] update tabs tests --- test/unit/tabs.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/tabs.test.ts b/test/unit/tabs.test.ts index 245fd460..fb8cb907 100644 --- a/test/unit/tabs.test.ts +++ b/test/unit/tabs.test.ts @@ -178,22 +178,22 @@ describe('tabWidget', () => { }) it('positions tabs on top by default', () => { tabWidgetElement = tabs.tabWidget(minimalOptions) - expect(tabWidgetElement.style['flex-direction']).toEqual('column;') + expect(tabWidgetElement.style['flex-direction']).toEqual('column') }) it('can position tabs on right', () => { tabWidgetElement = tabs.tabWidget({ orientation: '1', ...minimalOptions }) - expect(tabWidgetElement.style['flex-direction']).toEqual('row;') + expect(tabWidgetElement.style['flex-direction']).toEqual('row') }) it('can position tabs on bottom', () => { tabWidgetElement = tabs.tabWidget({ orientation: '2', ...minimalOptions }) - expect(tabWidgetElement.style['flex-direction']).toEqual('column-reverse;') + expect(tabWidgetElement.style['flex-direction']).toEqual('column-reverse') }) it('can position tabs on left', () => { tabWidgetElement = tabs.tabWidget({ orientation: '3', ...minimalOptions }) - expect(tabWidgetElement.style['flex-direction']).toEqual('row-reverse;') + expect(tabWidgetElement.style['flex-direction']).toEqual('row-reverse') }) })