From 33a91b5e0f7ed3b3e8ffebdadc1a7699f39b6093 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Wed, 13 Nov 2019 08:34:45 -0800 Subject: [PATCH] Fix tabs offset Summary: Tabs have a weird negative offsite in the mobile config section (they have everywhere by default, to escape their containers in a mac-style but it does hide them in this specific case) Reviewed By: priteshrnandgaonkar Differential Revision: D18448191 fbshipit-source-id: 792daa5a3ef1aa91df730bd185124076471e42d3 --- src/ui/components/Tabs.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/components/Tabs.tsx b/src/ui/components/Tabs.tsx index af29471bb..51d903e26 100644 --- a/src/ui/components/Tabs.tsx +++ b/src/ui/components/Tabs.tsx @@ -155,8 +155,14 @@ export default function Tabs(props: { * Elements to insert after all tabs in the tab list. */ after?: Array; + /** + * By default tabs are rendered in mac-style tabs, with a negative offset. + * By setting classic mode the classic style is rendered. + */ + classic?: boolean; }) { - const tabsContainer = useContext(TabsContext); + const tabsContainer = + props.classic === true ? false : useContext(TabsContext); const {onActive} = props; const active: string | undefined =