2023-07-24 08:54:17 +02:00
|
|
|
import React from 'react';
|
|
|
|
import {
|
|
|
|
BlockaidReason,
|
|
|
|
BlockaidResultType,
|
|
|
|
} from '../../../../../shared/constants/security-provider';
|
|
|
|
import BlockaidBannerAlert from '.';
|
|
|
|
|
|
|
|
const mockFeatures = [
|
|
|
|
'Operator is an EOA',
|
|
|
|
'Operator is untrusted according to previous activity',
|
|
|
|
];
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/App/SecurityProviderBannerAlert/BlockaidBannerAlert',
|
|
|
|
argTypes: {
|
|
|
|
features: {
|
|
|
|
control: 'array',
|
|
|
|
description:
|
2023-08-03 12:54:54 +02:00
|
|
|
'securityAlertResponse.features value which is a list displayed as SecurityProviderBannerAlert details',
|
2023-07-24 08:54:17 +02:00
|
|
|
},
|
|
|
|
reason: {
|
|
|
|
control: 'select',
|
|
|
|
options: Object.values(BlockaidReason),
|
2023-08-03 12:54:54 +02:00
|
|
|
description: 'securityAlertResponse.reason value',
|
2023-07-24 08:54:17 +02:00
|
|
|
},
|
2023-08-03 12:54:54 +02:00
|
|
|
result_type: {
|
2023-07-24 08:54:17 +02:00
|
|
|
control: 'select',
|
|
|
|
options: Object.values(BlockaidResultType),
|
2023-08-03 12:54:54 +02:00
|
|
|
description: 'securityAlertResponse.result_type value',
|
2023-07-24 08:54:17 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
features: mockFeatures,
|
|
|
|
reason: BlockaidReason.setApprovalForAll,
|
2023-08-03 12:54:54 +02:00
|
|
|
result_type: BlockaidResultType.Warning,
|
2023-07-24 08:54:17 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const DefaultStory = (args) => (
|
2023-08-03 12:54:54 +02:00
|
|
|
<BlockaidBannerAlert securityAlertResponse={args} />
|
2023-07-24 08:54:17 +02:00
|
|
|
);
|
|
|
|
DefaultStory.storyName = 'Default';
|