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

Commit

Permalink
fix: faq image padding and faq pages header padding
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Nov 15, 2023
1 parent 3e63d5d commit 6285b39
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const AnswerSection = ({ header, questions, answers }: FAQDataType) => {
content={{
data: accordionItems,
}}
className="p-general-none"
/>
</Section>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { CustomLink, CustomLinkProps } from '@deriv-com/components';
import {
CustomLink,
CustomLinkProps,
OptimizedImage,
OptimizedImageProps,
} from '@deriv-com/components';
import { Text, qtMerge, BodyTypographyProps } from '@deriv/quill-design';
import { PropsWithChildren, ReactNode } from 'react';

Expand Down Expand Up @@ -74,3 +79,7 @@ export const FaqList = ({
))}
</ul>
);

export const FaqImage = ({ ...otherProps }: OptimizedImageProps) => (
<OptimizedImage className="p-general-md" {...otherProps} />
);
29 changes: 18 additions & 11 deletions libs/templates/src/lib/help-center/sections/search/data.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { CardContent, OptimizedImage } from '@deriv-com/components';
import { CardContent } from '@deriv-com/components';

import { FAQDataType } from '../../types';

import { cardSetting, faqCardsMaxItems } from './types';
import { FaqBox, FaqLink, FaqList, FaqText, generateFaqs } from './components';
import {
FaqBox,
FaqLink,
FaqList,
FaqText,
FaqImage,
generateFaqs,
} from './components';

export const FAQData: FAQDataType[] = [
{
Expand Down Expand Up @@ -834,7 +841,7 @@ export const FAQData: FAQDataType[] = [
On the <strong>Trader’s Hub</strong>, hit{' '}
<strong>Open</strong> next to your Deriv MT5 account.
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/deriv-mt5-open.png"
alt="MT5 Open"
width={568}
Expand All @@ -843,7 +850,7 @@ export const FAQData: FAQDataType[] = [
</FaqBox>,
<FaqBox>
<FaqText>Hit the pencil icon next the password.</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/hit-the-pencil.png"
alt="MT5 Pencil"
width={568}
Expand All @@ -855,7 +862,7 @@ export const FAQData: FAQDataType[] = [
In the next screen, hit Change password under Deriv MT5
password.
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/deriv-mt5-password.png"
alt="MT5 Password"
width={568}
Expand All @@ -864,7 +871,7 @@ export const FAQData: FAQDataType[] = [
</FaqBox>,
<FaqBox>
<FaqText>Hit the pencil icon next the password.</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/hit-the-pencil.png"
alt="MT5 Pencil"
width={568}
Expand All @@ -876,7 +883,7 @@ export const FAQData: FAQDataType[] = [
Hit Confirm and follow the on-screen instructions to change
your Deriv MT5 password.
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/hit-confirm.png"
alt="Hit Confirm"
width={568}
Expand Down Expand Up @@ -927,7 +934,7 @@ export const FAQData: FAQDataType[] = [
On the <strong>Trader’s Hub</strong>, hit{' '}
<strong>Open</strong> next to your Deriv MT5 account.
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/deriv-mt5-open.png"
alt="MT5 Open"
width={568}
Expand All @@ -937,7 +944,7 @@ export const FAQData: FAQDataType[] = [
</FaqBox>,
<FaqBox>
<FaqText>Hit the pencil icon next to the password.</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/hit-the-pencil.png"
alt="MT5 Pencil"
width={568}
Expand All @@ -948,7 +955,7 @@ export const FAQData: FAQDataType[] = [
<FaqText>
On the next screen, select <strong>Investor password.</strong>
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/investor-password.png"
alt="Investor Password"
width={568}
Expand All @@ -972,7 +979,7 @@ export const FAQData: FAQDataType[] = [
Hit <strong>Open</strong> next to your Deriv MT5 account and find
the server below the broker name.
</FaqText>
<OptimizedImage
<FaqImage
imageName="help-centre/faq/deriv-mt5-server.png"
alt="MT5 Server"
width={568}
Expand Down

0 comments on commit 6285b39

Please sign in to comment.