From fdefa5952cb6cb6e1dce42e862dbc676690cdcbb Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 16 Oct 2018 23:25:51 +0100
Subject: chore: componentize the sidebar header

---
 .../ts/components/documentation/sidebar_header.tsx | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 packages/website/ts/components/documentation/sidebar_header.tsx

(limited to 'packages/website/ts/components/documentation/sidebar_header.tsx')

diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx
new file mode 100644
index 000000000..ec0ada8bd
--- /dev/null
+++ b/packages/website/ts/components/documentation/sidebar_header.tsx
@@ -0,0 +1,57 @@
+import { colors } from '@0xproject/react-shared';
+import * as _ from 'lodash';
+import * as React from 'react';
+import { VersionDropDown } from 'ts/components/documentation/version_drop_down';
+import { Container } from 'ts/components/ui/container';
+import { Text } from 'ts/components/ui/text';
+import { ScreenWidths } from 'ts/types';
+
+export interface SidebarHeaderProps {
+    screenWidth: ScreenWidths;
+    title: string;
+    docsVersion?: string;
+    availableDocVersions?: string[];
+    onVersionSelected?: () => void;
+}
+
+export const SidebarHeader: React.StatelessComponent<SidebarHeaderProps> = ({
+    screenWidth,
+    title,
+    docsVersion,
+    availableDocVersions,
+    onVersionSelected,
+}) => {
+    return (
+        <Container>
+            <Container className="flex justify-bottom">
+                <Container className="left pl1" width="150px">
+                    <Text
+                        fontColor={colors.lightLinkBlue}
+                        fontSize={screenWidth === ScreenWidths.Sm ? '20px' : '22px'}
+                        fontWeight="bold"
+                    >
+                        {title}
+                    </Text>
+                </Container>
+                {!_.isUndefined(docsVersion) &&
+                    !_.isUndefined(availableDocVersions) &&
+                    !_.isUndefined(onVersionSelected) && (
+                        <div className="right" style={{ alignSelf: 'flex-end' }}>
+                            <VersionDropDown
+                                selectedVersion={docsVersion}
+                                versions={availableDocVersions}
+                                onVersionSelected={onVersionSelected}
+                            />
+                        </div>
+                    )}
+            </Container>
+            <Container
+                width={'100%'}
+                height={'1px'}
+                backgroundColor={colors.grey300}
+                marginTop="20px"
+                marginBottom="27px"
+            />
+        </Container>
+    );
+};
-- 
cgit 


From 8c6de7f69dc1d2bc543456782c5e70e105026301 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 18 Oct 2018 13:59:40 +0100
Subject: chore: replace @0xproject with @0x in .tsx files

---
 packages/website/ts/components/documentation/sidebar_header.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/website/ts/components/documentation/sidebar_header.tsx')

diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx
index ec0ada8bd..fece2704b 100644
--- a/packages/website/ts/components/documentation/sidebar_header.tsx
+++ b/packages/website/ts/components/documentation/sidebar_header.tsx
@@ -1,4 +1,4 @@
-import { colors } from '@0xproject/react-shared';
+import { colors } from '@0x/react-shared';
 import * as _ from 'lodash';
 import * as React from 'react';
 import { VersionDropDown } from 'ts/components/documentation/version_drop_down';
-- 
cgit 

