mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Creating story for account-mismatch-warning
(#19460)
* Creating story for account-mismatch-warning * Removed line break --------- Co-authored-by: George Marshall <george.marshall@consensys.net>
This commit is contained in:
parent
a4f3a5fdd0
commit
29e6c2d34e
@ -5,7 +5,7 @@ import Tooltip from '../tooltip';
|
|||||||
import { getSelectedAccount } from '../../../selectors';
|
import { getSelectedAccount } from '../../../selectors';
|
||||||
import InfoIcon from '../icon/info-icon.component';
|
import InfoIcon from '../icon/info-icon.component';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
import { SEVERITIES } from '../../../helpers/constants/design-system';
|
import { Severity } from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
export default function AccountMismatchWarning({ address }) {
|
export default function AccountMismatchWarning({ address }) {
|
||||||
const selectedAccount = useSelector(getSelectedAccount);
|
const selectedAccount = useSelector(getSelectedAccount);
|
||||||
@ -25,7 +25,7 @@ export default function AccountMismatchWarning({ address }) {
|
|||||||
className="account-mismatch-warning__tooltip-container-icon"
|
className="account-mismatch-warning__tooltip-container-icon"
|
||||||
data-testid="account-mismatch-warning-tooltip"
|
data-testid="account-mismatch-warning-tooltip"
|
||||||
>
|
>
|
||||||
<InfoIcon severity={SEVERITIES.WARNING} />
|
<InfoIcon severity={Severity.Warning} />
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import AccountMismatchWarning from './account-mismatch-warning.component';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Components/UI/AccountMismatchWarning',
|
||||||
|
component: AccountMismatchWarning,
|
||||||
|
argTypes: {
|
||||||
|
address: {
|
||||||
|
control: 'text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DefaultStory = (args) => <AccountMismatchWarning {...args} />;
|
||||||
|
|
||||||
|
DefaultStory.storyName = 'Default';
|
||||||
|
DefaultStory.args = {
|
||||||
|
address: '0x5CfE73b6021E818B776b421B1c4Db2474086a7e1',
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user