Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Add '#' on all <a> #341

Merged
merged 3 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// SPDX-License-Identifier: BSD-3-Clause

import React, { Component } from 'react';
import { AccountCard, Header } from 'fether-ui';
import { AccountCard, Clickable, Header } from 'fether-ui';
import { accountsInfo$, withoutLoading } from '@parity/light.js';
import { inject, observer } from 'mobx-react';
import light from '@parity/light.js-react';
Expand Down Expand Up @@ -44,9 +44,10 @@ class AccountsList extends Component {
<Header
title={<h1>Accounts</h1>}
right={
<a className='icon -new' onClick={this.handleCreateAccount}>
New account
</a>
<Clickable
className='icon -new'
onClick={this.handleCreateAccount}
/>
}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const Feedback = ({ accountsListLength }) => (
<a
className='feedback'
href='https://github.com/paritytech/fether/issues/new'
rel='noopener noreferrer'
target='_blank'
style={{ marginBottom: accountsListLength > 1 ? '-2px' : '-10px' }}
>
Expand Down
6 changes: 3 additions & 3 deletions packages/fether-react/src/Send/TxForm/TxForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

import React, { Component } from 'react';
import BigNumber from 'bignumber.js';
import { Clickable, Form as FetherForm, Header } from 'fether-ui';
import createDecorator from 'final-form-calculate';
import debounce from 'debounce-promise';
import { Field, Form } from 'react-final-form';
import { Form as FetherForm, Header } from 'fether-ui';
import { fromWei, toWei } from '@parity/api/lib/util/wei';
import { inject, observer } from 'mobx-react';
import { isAddress } from '@parity/api/lib/util/address';
Expand Down Expand Up @@ -138,15 +138,15 @@ class Send extends Component {
showDetailsAnchor = () => {
return (
<span className='toggle-details'>
<a onClick={this.toggleDetails}>&darr; Details</a>
<Clickable onClick={this.toggleDetails}>&darr; Details</Clickable>
</span>
);
};

showHideAnchor = () => {
return (
<span className='toggle-details'>
<a onClick={this.toggleDetails}>&uarr; Hide</a>
<Clickable onClick={this.toggleDetails}>&uarr; Hide</Clickable>
</span>
);
};
Expand Down
5 changes: 3 additions & 2 deletions packages/fether-react/src/Whitelist/Whitelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { chainName$, withoutLoading } from '@parity/light.js';
import debounce from 'lodash/debounce';
import { Header } from 'fether-ui';
import light from '@parity/light.js-react';
import { Link } from 'react-router-dom';

import Health from '../Health';
import NewTokenItem from './NewTokenItem';
Expand Down Expand Up @@ -103,9 +104,9 @@ class Whitelist extends Component {
<div>
<Header
left={
<a to='/tokens' className='icon -back' onClick={history.goBack}>
<Link to='/tokens' className='icon -back' onClick={history.goBack}>
Close
</a>
</Link>
}
title={<h1>Search tokens</h1>}
/>
Expand Down
3 changes: 2 additions & 1 deletion packages/fether-ui/src/AccountHeader/AccountHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React from 'react';
import Blockies from 'react-blockies';
import PropTypes from 'prop-types';

import { Clickable } from '../Clickable';
import { ClickToCopy } from '../ClickToCopy';
import { Header } from '../Header';

Expand All @@ -15,7 +16,7 @@ const NormalContainer = ({ children }) => (
);
const CopyContainer = ({ address, children, ...otherProps }) => (
<ClickToCopy label='Copy address' textToCopy={address} {...otherProps}>
<a className='account -header'>{children}</a>
<Clickable className='account -header'>{children}</Clickable>
</ClickToCopy>
);

Expand Down
14 changes: 14 additions & 0 deletions packages/fether-ui/src/Clickable/Clickable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: BSD-3-Clause

import React from 'react';

// FIXME Use a button here, which the minimum amount of style to look like
// an <a>.
export const Clickable = ({ children, ...otherProps }) => (
<a href='#' {...otherProps}>
{children}
</a>
);
6 changes: 6 additions & 0 deletions packages/fether-ui/src/Clickable/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: BSD-3-Clause

export * from './Clickable';
1 change: 1 addition & 0 deletions packages/fether-ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './AccountCard';
export * from './AccountHeader';
export * from './AddressShort';
export * from './Card';
export * from './Clickable';
export * from './Form';
export * from './Header';
export * from './Placeholder';
Expand Down