Add Tabs container

Summary: Adding an additional style for tabs on top of a container, similar to the ones used in macOS

Reviewed By: passy

Differential Revision: D17450843

fbshipit-source-id: 6b58c2aa290e0221d917e60bb3ac0751f77ea1ce
This commit is contained in:
Daniel Büchele
2019-09-19 02:31:33 -07:00
committed by Facebook Github Bot
parent 2a6462641b
commit 735aee7682
3 changed files with 70 additions and 11 deletions

View File

@@ -0,0 +1,29 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import React from 'react';
import styled from 'react-emotion';
const Container = styled('div')({
backgroundColor: '#E3E3E3',
borderRadius: 4,
boxShadow: 'inset 0 1px 2px rgba(0,0,0,0.1)',
padding: 10,
paddingTop: 0,
marginTop: 11,
marginBottom: 10,
});
export const TabsContext = React.createContext(true);
export default function(props: {children: any}) {
return (
<Container>
<TabsContext.Provider value={true}>{props.children}</TabsContext.Provider>
</Container>
);
}