This commit is contained in:
Belén Curcio
2018-09-12 09:00:38 -03:00
parent 19b1a7882c
commit cc67f2f572
3 changed files with 20 additions and 4 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import cn from "classnames";
import React from "react";
import React, { ReactNode } from "react";
import { withStyles } from "talk-ui/hocs";
import * as styles from "./Tab.css";
@@ -19,11 +19,11 @@ export interface TabProps {
/**
* Active status
*/
active: boolean;
active?: boolean;
/**
* Color style variant
*/
color: "primary" | "secondary";
color?: "primary" | "secondary";
/**
* Action taken on tab click
*/
@@ -0,0 +1,16 @@
import React from "react";
import TestRenderer from "react-test-renderer";
import Tab from "./Tab";
import TabBar from "./TabBar";
it("renders correctly", () => {
const renderer = TestRenderer.create(
<TabBar activeTab="one">
<Tab tabId="one">One</Tab>
<Tab tabId="two">Two</Tab>
<Tab tabId="three">Three</Tab>
</TabBar>
);
expect(renderer.toJSON()).toMatchSnapshot();
});
@@ -15,7 +15,7 @@ export interface TabBarProps {
/**
* Color style variant
*/
color: "primary" | "secondary";
color?: "primary" | "secondary";
/**
* Active tab id/name
*/