Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #359 from deriv-com/prince/export-live-market-props
Browse files Browse the repository at this point in the history
Prince/export live market props
  • Loading branch information
prince-deriv authored Feb 1, 2024
2 parents de2b7ac + edd71c6 commit 12d38d1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
4 changes: 3 additions & 1 deletion libs/blocks/src/lib/live-market/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { ReactNode } from 'react';
import { LiveMarketSlider } from './slider';
import { LiveMarketTab } from './tab';

type LiveMarketBlockType = {
export * from './types';

export type LiveMarketBlockType = {
Slider: typeof LiveMarketSlider;
Tab: typeof LiveMarketTab;
};
Expand Down
15 changes: 2 additions & 13 deletions libs/blocks/src/lib/live-market/slider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import { ComponentProps } from 'react';
import {
CardSlider,
CardSliderProps,
CardVariantType,
} from '@deriv-com/components';
import { CardSlider, CardVariantType } from '@deriv-com/components';
import { LiveMarket } from '@deriv-com/components';

export type LiveMarketProps<T extends CardVariantType> = Omit<
ComponentProps<typeof LiveMarket.Container>,
'children'
> & {
cardSliderProps?: CardSliderProps<T>;
};
import { LiveMarketProps } from '../types';

export const LiveMarketSlider = <T extends CardVariantType>({
header,
Expand Down
5 changes: 1 addition & 4 deletions libs/blocks/src/lib/live-market/tab/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { LiveMarket, Tab } from '@deriv-com/components';
import { ComponentProps } from 'react';

export type LiveMarketTabType = ComponentProps<typeof LiveMarket.Container> &
ComponentProps<typeof Tab.Base>;
import { LiveMarketTabType } from '../types';

export const LiveMarketTab = ({
header,
Expand Down
18 changes: 18 additions & 0 deletions libs/blocks/src/lib/live-market/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
CardSliderProps,
CardVariantType,
LiveMarket,
Tab,
} from '@deriv-com/components';

import { ComponentProps } from 'react';

export type LiveMarketTabType = ComponentProps<typeof LiveMarket.Container> &
ComponentProps<typeof Tab.Base>;

export type LiveMarketProps<T extends CardVariantType> = Omit<
ComponentProps<typeof LiveMarket.Container>,
'children'
> & {
cardSliderProps?: CardSliderProps<T>;
};

0 comments on commit 12d38d1

Please sign in to comment.