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 #370 from deriv-com/meenu-export-cta-block
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv authored Feb 16, 2024
2 parents 8597ab4 + 16595ae commit b9bd843
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions libs/blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ export * from './lib/search';
export * from './lib/social-proof';
export * from './lib/platform';
export * from './lib/block-wrapper';
export * from './lib/cta';
6 changes: 3 additions & 3 deletions libs/blocks/src/lib/cta/cta.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react';
import CTABlock from '.';
import { Text } from '@deriv/quill-design';
import { Button, Text } from '@deriv/quill-design';

const meta = {
title: 'Blocks/CTABlock',
Expand Down Expand Up @@ -36,8 +36,8 @@ export const CTAContentLeft: Story = {
content: (
<>
<img
className="block w-full lg:hidden"
src="https://placehold.co/420x230"
className="block w-full flex-1 lg:hidden"
src="https://placehold.co/256x496"
alt="Placeholder"
/>
<img
Expand Down
14 changes: 9 additions & 5 deletions libs/blocks/src/lib/cta/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ const CTABlock = ({
variant = 'content-left',
}: CTABlockProps) => {
return (
<Section className="py-general-4xl">
<Section className=" py-general-4xl">
<div
className={clsx(
' relative isolate flex flex-col justify-center gap-gap-lg lg:mx-auto lg:max-w-[1232px]',
' relative isolate flex h-full min-h-[496px] flex-col justify-end gap-gap-lg md:justify-center lg:mx-auto lg:max-w-[1232px] ',
variant === 'content-left' ? 'lg:flex-row-reverse' : 'lg:flex-row ',
)}
>
<div
className={clsx(
'flex flex-col justify-center gap-gap-3xl px-general-lg lg:px-general-none ',
'flex w-full flex-col justify-center gap-gap-3xl px-general-lg pb-general-2xl lg:px-general-none lg:pb-general-none',
variant === 'content-left'
? 'lg:ps-general-2xl '
: 'lg:pe-general-2xl ',
Expand All @@ -41,15 +41,19 @@ const CTABlock = ({
'lg:w-full',
)}
>
{title && <Heading.H2>{title}</Heading.H2>}
{title && (
<Heading.H2 className="text-solid-slate-50 lg:text-typography-prominent">
{title}
</Heading.H2>
)}
{description && <Text>{description}</Text>}
</div>
{children && children}
</div>
{content && (
<div
className={clsx([
'absolute -z-10 overflow-hidden object-cover object-top',
'absolute -z-10 h-full overflow-hidden object-cover object-top ',
'h-full w-full lg:relative',
])}
>
Expand Down

0 comments on commit b9bd843

Please sign in to comment.