From e6f8b7623ba21929945771cbf7d206d844b04c08 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Wed, 12 Sep 2018 15:10:14 -0300 Subject: [PATCH] Adding docs and changes --- src/core/client/ui/components/Tabs/Tab.css | 4 +- src/core/client/ui/components/Tabs/Tab.mdx | 25 --------- src/core/client/ui/components/Tabs/Tab.tsx | 10 ++-- src/core/client/ui/components/Tabs/TabBar.css | 2 +- src/core/client/ui/components/Tabs/TabBar.mdx | 51 ------------------- .../client/ui/components/Tabs/TabContent.mdx | 23 --------- .../client/ui/components/Tabs/TabPane.mdx | 23 --------- .../client/ui/components/Tabs}/tabs.mdx | 0 8 files changed, 8 insertions(+), 130 deletions(-) delete mode 100644 src/core/client/ui/components/Tabs/Tab.mdx delete mode 100644 src/core/client/ui/components/Tabs/TabBar.mdx delete mode 100644 src/core/client/ui/components/Tabs/TabContent.mdx delete mode 100644 src/core/client/ui/components/Tabs/TabPane.mdx rename src/{docs => core/client/ui/components/Tabs}/tabs.mdx (100%) diff --git a/src/core/client/ui/components/Tabs/Tab.css b/src/core/client/ui/components/Tabs/Tab.css index 9650b8a95..ca7ac0f66 100644 --- a/src/core/client/ui/components/Tabs/Tab.css +++ b/src/core/client/ui/components/Tabs/Tab.css @@ -13,7 +13,7 @@ } .root.primary { - background: #f2f2f2; + background: var(--palette-grey-lightest); color: var(--palette-grey-main); border: 1px solid var(--palette-grey-main); border-left-width: 0; @@ -32,7 +32,7 @@ background-color: var(--palette-common-white); color: var(--palette-common-black); border-bottom-color: var(--palette-common-white); - border-top-width: 5px; + border-top-width: calc(0.5 * var(--spacing-unit)); border-top-color: var(--palette-primary-main); } } diff --git a/src/core/client/ui/components/Tabs/Tab.mdx b/src/core/client/ui/components/Tabs/Tab.mdx deleted file mode 100644 index f81399cfc..000000000 --- a/src/core/client/ui/components/Tabs/Tab.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Tab -menu: UI Kit ---- - -import { Playground, PropsTable } from 'docz' -import HorizontalGutter from '../HorizontalGutter' - - -import TabBar from './TabBar' -import Tab from './Tab' - -# Tab -`Tab` component is to be used within the `TabBar` component. This renders a Tab inside the Tab Bar.s - -## Basic Usage - - - - Tab one - Active Tab - Tab Three - - - diff --git a/src/core/client/ui/components/Tabs/Tab.tsx b/src/core/client/ui/components/Tabs/Tab.tsx index 9afe73023..e0fd95eb8 100644 --- a/src/core/client/ui/components/Tabs/Tab.tsx +++ b/src/core/client/ui/components/Tabs/Tab.tsx @@ -21,9 +21,9 @@ export interface TabProps { */ active?: boolean; /** - * Color style variant + * Style variant */ - color?: "primary" | "secondary"; + variant?: "primary" | "secondary"; /** * Action taken on tab click */ @@ -38,13 +38,13 @@ class Tab extends React.Component { }; public render() { - const { className, classes, children, tabId, active, color } = this.props; + const { className, classes, children, tabId, active, variant } = this.props; const rootClassName = cn( classes.root, { - [classes.primary]: color === "primary", - [classes.secondary]: color === "secondary", + [classes.primary]: variant === "primary", + [classes.secondary]: variant === "secondary", [classes.active]: active, }, className diff --git a/src/core/client/ui/components/Tabs/TabBar.css b/src/core/client/ui/components/Tabs/TabBar.css index cb75fbb27..7ea4a5ac3 100644 --- a/src/core/client/ui/components/Tabs/TabBar.css +++ b/src/core/client/ui/components/Tabs/TabBar.css @@ -9,5 +9,5 @@ } .secondary { - border-bottom: 1px solid #e0e0e0; + border-bottom: 1px solid var(--palette-divider); } diff --git a/src/core/client/ui/components/Tabs/TabBar.mdx b/src/core/client/ui/components/Tabs/TabBar.mdx deleted file mode 100644 index 14fc68a3b..000000000 --- a/src/core/client/ui/components/Tabs/TabBar.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: TabBar -menu: UI Kit ---- - -import { Playground, PropsTable } from 'docz' -import HorizontalGutter from '../HorizontalGutter' - - -import TabBar from './TabBar' -import Tab from './Tab' - -# TabBar - -## Basic Use - - - - - Tab one - Active Tab - Tab Three - - - - Tab one - Active Tab - Tab Three - - - - Tab one - Active Tab - Tab Three - - - - - -## Secondary Color - - - - - Tab one - Active Tab - Tab Three - - - - diff --git a/src/core/client/ui/components/Tabs/TabContent.mdx b/src/core/client/ui/components/Tabs/TabContent.mdx deleted file mode 100644 index 1646887a5..000000000 --- a/src/core/client/ui/components/Tabs/TabContent.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: TabContent -menu: UI Kit ---- - -import { Playground, PropsTable } from 'docz' -import HorizontalGutter from '../HorizontalGutter' - -import TabPane from './TabPane' -import TabContent from './TabContent' - -# TabContent - -## Basic Use - - - - Hola One - Hola Two - Hola Three - - - diff --git a/src/core/client/ui/components/Tabs/TabPane.mdx b/src/core/client/ui/components/Tabs/TabPane.mdx deleted file mode 100644 index 36cb915f0..000000000 --- a/src/core/client/ui/components/Tabs/TabPane.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: TabPane -menu: UI Kit ---- - -import { Playground, PropsTable } from 'docz' -import HorizontalGutter from '../HorizontalGutter' - -import TabPane from './TabPane' -import TabContent from './TabContent' - -# TabPane - -## Basic Use - - - - Hola One - Hola Two - Hola Three - - - diff --git a/src/docs/tabs.mdx b/src/core/client/ui/components/Tabs/tabs.mdx similarity index 100% rename from src/docs/tabs.mdx rename to src/core/client/ui/components/Tabs/tabs.mdx