mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* add contract method id tag * add form submit type * refactor types for SmartConstract and make new component for Contract ABI methods * move contract method form inside ABI folder * handle form submit and display result * clean-up * change copied text * handle case when blockchain interaction is not configured * tests and screenshots update * fix bug wit WEI checkbox
28 lines
599 B
TypeScript
28 lines
599 B
TypeScript
import React from 'react';
|
|
|
|
import type { RoutedSubTab } from 'ui/shared/Tabs/types';
|
|
|
|
import RoutedTabs from 'ui/shared/Tabs/RoutedTabs';
|
|
|
|
interface Props {
|
|
tabs: Array<RoutedSubTab>;
|
|
isLoading: boolean;
|
|
shouldRender?: boolean;
|
|
}
|
|
|
|
const TAB_LIST_PROPS = {
|
|
columnGap: 3,
|
|
};
|
|
|
|
const AddressContract = ({ tabs, isLoading, shouldRender }: Props) => {
|
|
if (!shouldRender) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<RoutedTabs tabs={ tabs } variant="outline" colorScheme="gray" size="sm" tabListProps={ TAB_LIST_PROPS } isLoading={ isLoading }/>
|
|
);
|
|
};
|
|
|
|
export default React.memo(AddressContract);
|