mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-16 04:57:08 +00:00
* Remove gas dropdown & Add gas sliders * Update styles * Revert changes made to requestpayment.tsx * Update style & add custom labels to GasLimitField * Update styles * Update confirm transaction modal * Revert "Update confirm transaction modal" This reverts commit 743c9a505fe070feb55f7af550ad918a3d8899d1. * Add transaction fee to tx confirmation modal * Update styles * Remove old gasPriceDropdown files & use network units in tx fee * Add option to lock gaslimit data * fix tslint errors * Rename lockData to readOnly * Add option to check if validAmount before generating transaction * Add nonce field if gas slider is readonly * Automatically set nonce in <Send/> * Update snapshot * Move getNonceRequested to GasSlider component * Add optional to check value for isValidAmount selector * Add selector for transaction fee * Update GasSlider component & Rename to Gas * update snapshots * Fix subtabs className * Update styles * Remove dataField on contract interact * rename <Gas/> to <TXMetaDataPanel/>
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
import { NavLink, RouteComponentProps } from 'react-router-dom';
|
|
import './SubTabs.scss';
|
|
|
|
export interface Tab {
|
|
name: string | React.ReactElement<any>;
|
|
path: string;
|
|
disabled?: boolean;
|
|
redirect?: string;
|
|
}
|
|
|
|
interface Props {
|
|
tabs: Tab[];
|
|
match: RouteComponentProps<{}>['match'];
|
|
}
|
|
|
|
export default class SubTabs extends React.Component<Props> {
|
|
public render() {
|
|
const { tabs, match } = this.props;
|
|
const currentPath = match.url;
|
|
|
|
return (
|
|
<div className="SubTabs row">
|
|
<div className="SubTabs-tabs col-sm-12">
|
|
{tabs.map((t, i) => (
|
|
// Same as normal Link, but knows when it's active, and applies activeClassName
|
|
<NavLink
|
|
className={`SubTabs-tabs-link ${t.disabled ? 'is-disabled' : ''}`}
|
|
activeClassName="is-active"
|
|
to={currentPath + '/' + t.path}
|
|
key={i}
|
|
>
|
|
{t.name}
|
|
</NavLink>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|