Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Export individual tabbar components and associated props #28

Merged
merged 1 commit into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/bubble/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default } from './BubbleTabBar';
export { default as BubbleTabBarItem, BubbleTabBarItemProps } from './item';
export { BubbleTabConfig, BubbleTabIconProps } from './types';
6 changes: 3 additions & 3 deletions src/bubble/item/BubbleTabBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const { add, interpolate, useCode, set, cond, eq } = Animated;
const gestureHandler = (state: Animated.Value<State>) =>
onGestureEvent({ state });

const BubbleTabBarItemComponent = (
props: TabBarItemProps & BubbleTabConfig
) => {
export type BubbleTabBarItemProps = TabBarItemProps & BubbleTabConfig;

const BubbleTabBarItemComponent = (props: BubbleTabBarItemProps) => {
// props
const {
index,
Expand Down
2 changes: 1 addition & 1 deletion src/bubble/item/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './BubbleTabBarItem';
export { default, BubbleTabBarItemProps } from './BubbleTabBarItem';
1 change: 1 addition & 0 deletions src/flashy/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default } from './FlashyTabBar';
export { default as FlashyTabBarItem, FlashyTabBarItemProps } from './item';
export { FlashyTabConfig, FlashyTabIconProps } from './types';
7 changes: 4 additions & 3 deletions src/flashy/item/FlashyTabBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ const {
const gestureHandler = (state: Animated.Value<State>) =>
onGestureEvent({ state });

const FlashyTabBarItemComponent = (
props: Omit<TabBarItemProps, 'itemOuterSpace'> & FlashyTabConfig
) => {
export type FlashyTabBarItemProps = Omit<TabBarItemProps, 'itemOuterSpace'> &
FlashyTabConfig;

const FlashyTabBarItemComponent = (props: FlashyTabBarItemProps) => {
// props
const {
index,
Expand Down
2 changes: 1 addition & 1 deletion src/flashy/item/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './FlashyTabBarItem';
export { default, FlashyTabBarItemProps } from './FlashyTabBarItem';
22 changes: 19 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
export { AnimatedTabBar as default } from './AnimatedTabBar';
import { BubbleTabConfig, BubbleTabIconProps } from './bubble';
export { FlashyTabConfig, FlashyTabIconProps } from './flashy';
import {
BubbleTabConfig,
BubbleTabIconProps,
BubbleTabBarItem,
BubbleTabBarItemProps,
} from './bubble';
export {
FlashyTabConfig,
FlashyTabIconProps,
FlashyTabBarItem,
FlashyTabBarItemProps,
} from './flashy';
import { TabsConfig } from './types';

/**
Expand All @@ -9,4 +19,10 @@ import { TabsConfig } from './types';
*/
export type TabsConfigsType = TabsConfig<BubbleTabConfig>;

export { BubbleTabConfig, BubbleTabIconProps, TabsConfig };
export {
BubbleTabConfig,
BubbleTabIconProps,
BubbleTabBarItem,
BubbleTabBarItemProps,
TabsConfig,
};