Skip to content

Commit

Permalink
fix(tabs): update props definition
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbirgand committed Jun 17, 2020
1 parent 47df430 commit 0cae1d6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/tabs/src/TabsCore.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import * as React from 'react';
import { useState } from 'react';
import TabsStateless from './TabsStateless';
import { TabProps } from './Tab';
import TabsStateless, { TabsStatelessProps } from './TabsStateless';

export type TabsContainerState = {
activeIndex: string;
};

const defaultState = { activeIndex: '0' };

export type TabsCoreProps = {
children: React.ReactElement<TabProps>[];
export type TabsCoreProps = Tabs & Omit<TabsStatelessProps, 'activeIndex'>;

interface Tabs {
onChange?: (e: string) => void;
activeIndex?: string;
className?: string;
classModifier?: string;
onChange?: (tabIndex: string) => void;
};
}

export const onChangeEvent = (onChange: Function) => (setState: Function) => (
state: any
Expand Down

0 comments on commit 0cae1d6

Please sign in to comment.