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

Part of #17670: Replace Typography with Text component in:gas-items-details #19075

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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { useSelector } from 'react-redux';

import { TypographyVariant } from '../../../../helpers/constants/design-system';
import { TextVariant } from '../../../../helpers/constants/design-system';
import { useI18nContext } from '../../../../hooks/useI18nContext';
import { getIsMainnet } from '../../../../selectors';
import Box from '../../../ui/box';
import InfoTooltip from '../../../ui/info-tooltip/info-tooltip';
import Typography from '../../../ui/typography/typography';
import { Text } from '../../../component-library';

const GasDetailsItemTitle = () => {
const t = useI18nContext();
Expand All @@ -21,23 +21,23 @@ const GasDetailsItemTitle = () => {
<InfoTooltip
contentText={
<>
<Typography variant={TypographyVariant.H7}>
<Text variant={TextVariant.bodySm} as="h6">
dhruvv173 marked this conversation as resolved.
Show resolved Hide resolved
{t('transactionDetailGasTooltipIntro', [
isMainnet ? t('networkNameEthereum') : '',
])}
</Typography>
<Typography variant={TypographyVariant.H7}>
</Text>
<Text variant={TextVariant.bodySm} as="h6">
{t('transactionDetailGasTooltipExplanation')}
</Typography>
<Typography variant={TypographyVariant.H7}>
</Text>
<Text variant={TextVariant.bodySm} as="h6">
<a
href="https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172"
target="_blank"
rel="noopener noreferrer"
>
{t('transactionDetailGasTooltipConversion')}
</a>
</Typography>
</Text>
</>
}
position="bottom"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import GasDetailsItemTitle from '.';

export default {
title: 'Components/App/GasDetailsItemTitle',
};

export const DefaultStory = () => <GasDetailsItemTitle />;

DefaultStory.storyName = 'Default';
10 changes: 10 additions & 0 deletions ui/components/app/gas-details-item/gas-details-item.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import GasDetailsItem from '.';

export default {
title: 'Components/App/GasDetailsItem',
};

export const DefaultStory = () => <GasDetailsItem />;

DefaultStory.storyName = 'Default';