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

Commit

Permalink
Merge branch 'main' of github.com:deriv-com/deriv-com-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jia-deriv committed Dec 5, 2023
2 parents 1866748 + 651bbe1 commit d6c50fc
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 43 deletions.
2 changes: 2 additions & 0 deletions libs/blocks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.30.0](https://github.com/deriv-com/deriv-com-v2/compare/blocks-0.29.0...blocks-0.30.0) (2023-12-05)

## [0.29.0](https://github.com/deriv-com/deriv-com-v2/compare/blocks-0.28.0...blocks-0.29.0) (2023-12-04)

## [0.28.0](https://github.com/deriv-com/deriv-com-v2/compare/blocks-0.27.0...blocks-0.28.0) (2023-12-04)
Expand Down
2 changes: 1 addition & 1 deletion libs/blocks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deriv-com/blocks",
"version": "0.29.0",
"version": "0.30.0",
"main": "./index.js",
"exports": {
".": {
Expand Down
96 changes: 57 additions & 39 deletions libs/blocks/src/lib/live-market/tab/tab.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MarketForexGbpusdIcon,
MarketForexUsdjpyIcon,
} from '@deriv/quill-icons/Markets';
import { CardsContainer } from '@deriv-com/components';
import { CardSlider, CardsContainer } from '@deriv-com/components';

const meta = {
title: 'Blocks/LiveMarket/Tab',
Expand All @@ -31,19 +31,22 @@ export const Default: Story = {
{ children: 'Etfs' },
]}
>
<CardsContainer
cols="four"
<CardSlider
variant="LiveMarketCard"
cards={[
{
instrumentIcon: <MarketForexEurusdIcon />,
instrument: 'EUR/USD',
changePercentage: '+0.11%',
status: 'up',
bidPrice: '1.07219',
askPrice: '1.07223',
spread: '0.00005',
slideClasses="max-w-full"
swiperData={{
spaceBetween: 16,
breakpoints: {
1280: {
slidesPerView: 4,
},
1024: {
slidesPerView: 'auto',
},
},
pagination: undefined,
}}
cards={[
{
instrumentIcon: <MarketForexGbpusdIcon />,
instrument: 'GBP/USD',
Expand All @@ -53,6 +56,15 @@ export const Default: Story = {
askPrice: '1.24502',
spread: '0.0001',
},
{
instrumentIcon: <MarketForexEurusdIcon />,
instrument: 'EUR/USD',
changePercentage: '+0.11%',
status: 'up',
bidPrice: '1.07219',
askPrice: '1.07223',
spread: '0.00005',
},
{
instrumentIcon: <MarketForexUsdjpyIcon />,
instrument: 'USD/JPY',
Expand All @@ -73,9 +85,21 @@ export const Default: Story = {
},
]}
/>
<CardsContainer
cols="four"
<CardSlider
variant="LiveMarketCard"
slideClasses="max-w-full"
swiperData={{
spaceBetween: 16,
breakpoints: {
1280: {
slidesPerView: 4,
},
1024: {
slidesPerView: 'auto',
},
},
pagination: undefined,
}}
cards={[
{
instrumentIcon: <MarketForexEurusdIcon />,
Expand All @@ -87,12 +111,12 @@ export const Default: Story = {
spread: '0.00005',
},
{
instrumentIcon: <MarketForexEurusdIcon />,
instrument: 'EUR/USD',
instrumentIcon: <MarketForexUsdjpyIcon />,
instrument: 'USD/JPY',
changePercentage: '+0.11%',
status: 'up',
bidPrice: '1.07219',
askPrice: '1.07223',
status: 'remain',
bidPrice: '0.24234',
askPrice: '0.24265',
spread: '0.00005',
},
{
Expand All @@ -104,15 +128,6 @@ export const Default: Story = {
askPrice: '1.24502',
spread: '0.0001',
},
{
instrumentIcon: <MarketForexUsdjpyIcon />,
instrument: 'USD/JPY',
changePercentage: '+0.11%',
status: 'remain',
bidPrice: '0.24234',
askPrice: '0.24265',
spread: '0.00005',
},
{
instrumentIcon: <MarketForexAudusdIcon />,
instrument: 'AUD/USD',
Expand All @@ -124,9 +139,21 @@ export const Default: Story = {
},
]}
/>
<CardsContainer
cols="four"
<CardSlider
variant="LiveMarketCard"
slideClasses="max-w-full"
swiperData={{
spaceBetween: 16,
breakpoints: {
1280: {
slidesPerView: 4,
},
1024: {
slidesPerView: 'auto',
},
},
pagination: undefined,
}}
cards={[
{
instrumentIcon: <MarketForexAudusdIcon />,
Expand Down Expand Up @@ -164,15 +191,6 @@ export const Default: Story = {
askPrice: '0.24265',
spread: '0.00005',
},
{
instrumentIcon: <MarketForexAudusdIcon />,
instrument: 'AUD/USD',
changePercentage: '0.00%',
status: 'closed',
bidPrice: '0.66118',
askPrice: '0.66243',
spread: '0.00005',
},
]}
/>
</LiveMarketTab>
Expand Down
2 changes: 2 additions & 0 deletions libs/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.21.0](https://github.com/deriv-com/deriv-com-v2/compare/components-0.20.0...components-0.21.0) (2023-12-05)

## [0.20.0](https://github.com/deriv-com/deriv-com-v2/compare/components-0.19.0...components-0.20.0) (2023-12-04)

## [0.19.0](https://github.com/deriv-com/deriv-com-v2/compare/components-0.18.0...components-0.19.0) (2023-12-01)
Expand Down
2 changes: 1 addition & 1 deletion libs/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deriv-com/components",
"version": "0.20.0",
"version": "0.21.0",
"main": "./index.js",
"exports": {
".": {
Expand Down
4 changes: 2 additions & 2 deletions libs/components/src/lib/card-slider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from 'clsx';
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/pagination';
import { qtMerge } from '@deriv/quill-design';
import { qtJoin } from '@deriv/quill-design';
import Card, { CardVariants } from '../card';
import { SwiperOptions } from 'swiper/types';

Expand Down Expand Up @@ -45,7 +45,7 @@ export const CardSlider = <T extends CardVariantType>({
return (
<div className="flex w-full justify-center">
<Swiper
className={qtMerge(className)}
className={qtJoin('h-full w-full', className)}
slidesPerView={slidesPerView}
spaceBetween={spaceBetween}
breakpoints={breakpoints}
Expand Down

0 comments on commit d6c50fc

Please sign in to comment.