A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/components/app/modals/contract-details-modal/contract-details-modal.stor...

57 lines
1.2 KiB

import React, { useState } from 'react';
import Button from '../../../ui/button';
import ContractDetailsModal from './contract-details-modal';
export default {
title: 'Components/App/Modals/ContractDetailsModal',
id: __filename,
argTypes: {
onClosePopover: {
action: 'Close Contract Details',
},
onOpenPopover: {
action: 'Open Contract Details',
},
tokenName: {
control: {
type: 'text',
},
},
address: {
control: {
type: 'text',
},
},
},
args: {
tokenName: 'DAI',
address: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
},
};
export const DefaultStory = (args) => {
const [showContractDetails, setshowContractDetails] = useState(false);
return (
<>
<Button
onClick={() => {
args.onOpenPopover();
setshowContractDetails(true);
}}
>
Verify contract details
</Button>
{showContractDetails && (
<ContractDetailsModal
onClose={() => {
args.onClosePopover();
setshowContractDetails(false);
}}
{...args}
/>
)}
</>
);
};
DefaultStory.storyName = 'Default';