Commit 73c10544 authored by Amaury Martiny's avatar Amaury Martiny

Don't use default exports

parent 9dad38c0
......@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
import Address from './Address';
import Avatar from './Avatar';
import Card from '../Card';
import { Card } from '../Card';
import Information from './Information';
import Name from './Name';
const AccountCard = ({ address, name, shortAddress, ...otherProps }) => (
export const AccountCard = ({ address, name, shortAddress, ...otherProps }) => (
<Card {...otherProps}>
<div className='account'>
<Avatar address={address} />
......@@ -34,5 +34,3 @@ AccountCard.propTypes = {
name: PropTypes.string,
shortAddress: PropTypes.bool
};
export default AccountCard;
......@@ -6,8 +6,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import AddressShort from '../../AddressShort';
import Placeholder from '../../Placeholder';
import { AddressShort } from '../../AddressShort';
import { Placeholder } from '../../Placeholder';
const Address = ({ address, short, ...otherProps }) => (
<div className='account_address' {...otherProps}>
......
......@@ -7,7 +7,7 @@ import React from 'react';
import Blockies from 'react-blockies';
import PropTypes from 'prop-types';
import Placeholder from '../../Placeholder';
import { Placeholder } from '../../Placeholder';
const Avatar = ({ address, ...otherProps }) => (
<div className='account_avatar' {...otherProps}>
......
......@@ -6,7 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import Placeholder from '../../Placeholder';
import { Placeholder } from '../../Placeholder';
const Name = ({ name, ...otherProps }) => (
<div className='account_name' {...otherProps}>
......
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import AccountCard from './AccountCard';
export default AccountCard;
export * from './AccountCard';
......@@ -7,8 +7,8 @@ import React from 'react';
import Blockies from 'react-blockies';
import PropTypes from 'prop-types';
import ClickToCopy from '../ClickToCopy';
import Header from '../Header';
import { ClickToCopy } from '../ClickToCopy';
import { Header } from '../Header';
const NormalContainer = ({ children }) => (
<h1 className='account -header'>{children}</h1>
......@@ -19,7 +19,12 @@ const CopyContainer = ({ address, children, ...otherProps }) => (
</ClickToCopy>
);
const AccountHeader = ({ address, copyAddress, name, ...otherProps }) => {
export const AccountHeader = ({
address,
copyAddress,
name,
...otherProps
}) => {
const Container = copyAddress ? CopyContainer : NormalContainer;
return (
......@@ -45,5 +50,3 @@ AccountHeader.propTypes = {
address: PropTypes.string,
name: PropTypes.string
};
export default AccountHeader;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import AccountHeader from './AccountHeader';
export default AccountHeader;
export * from './AccountHeader';
......@@ -6,7 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
const AddressShort = ({ address, as: T = 'span', ...otherProps }) => (
export const AddressShort = ({ address, as: T = 'span', ...otherProps }) => (
<T {...otherProps}>
{address.slice(0, 6)}..{address.slice(-4)}
</T>
......@@ -15,5 +15,3 @@ const AddressShort = ({ address, as: T = 'span', ...otherProps }) => (
AddressShort.propTypes = {
address: PropTypes.string.isRequired
};
export default AddressShort;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import AddressShort from './AddressShort';
export default AddressShort;
export * from './AddressShort';
......@@ -6,7 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
const Card = ({ children, className, drawers, onClick }) => (
export const Card = ({ children, className, drawers, onClick }) => (
<div
className={['box', '-card', onClick ? '-clickable' : '', className].join(
' '
......@@ -29,5 +29,3 @@ Card.propTypes = {
drawers: PropTypes.arrayOf(PropTypes.node), // A card can have multiple drawers
onClick: PropTypes.func
};
export default Card;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import Card from './Card';
export default Card;
export * from './Card';
......@@ -7,7 +7,7 @@ import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ReactTooltip from 'react-tooltip';
class ClickToCopy extends PureComponent {
export class ClickToCopy extends PureComponent {
static defaultProps = {
label: 'Click to copy'
};
......@@ -68,5 +68,3 @@ class ClickToCopy extends PureComponent {
);
}
}
export default ClickToCopy;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import ClickToCopy from './ClickToCopy';
export default ClickToCopy;
export * from './ClickToCopy';
......@@ -6,7 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
const FormField = ({
export const FormField = ({
className,
input: inputComponent,
label,
......@@ -23,5 +23,3 @@ FormField.propTypes = {
input: PropTypes.node,
label: PropTypes.string
};
export default FormField;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import FormField from './FormField';
export default FormField;
export * from './FormField';
......@@ -6,9 +6,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import Placeholder from '../Placeholder';
import { Placeholder } from '../Placeholder';
const Header = ({ left, right, title }) => (
export const Header = ({ left, right, title }) => (
<div className='header-nav'>
<div className='header-nav_left'>{left}</div>
<div className='header-nav_title'>
......@@ -23,5 +23,3 @@ Header.propTypes = {
right: PropTypes.node,
title: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
};
export default Header;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import Header from './Header';
export default Header;
export * from './Header';
......@@ -7,7 +7,7 @@ import React from 'react';
import ContentLoader from 'react-content-loader';
import PropTypes from 'prop-types';
const Placeholder = ({ height, width, ...otherProps }) => (
export const Placeholder = ({ height, width, ...otherProps }) => (
<ContentLoader
className='placeholder'
height={height}
......@@ -23,5 +23,3 @@ Placeholder.propTypes = {
height: PropTypes.number.isRequired,
width: PropTypes.number.isRequired
};
export default Placeholder;
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import Placeholder from './Placeholder';
export default Placeholder;
export * from './Placeholder';
......@@ -6,10 +6,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import Card from '../Card';
import Placeholder from '../Placeholder';
import { Card } from '../Card';
import { Placeholder } from '../Placeholder';
const TokenCard = ({
export const TokenCard = ({
balance,
children,
decimals,
......
......@@ -3,6 +3,4 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import TokenCard from './TokenCard';
export default TokenCard;
export * from './TokenCard';
......@@ -3,22 +3,11 @@
//
// SPDX-License-Identifier: BSD-3-Clause
import AccountCard from './AccountCard';
import AccountHeader from './AccountHeader';
import AddressShort from './AddressShort';
import Card from './Card';
import FormField from './FormField';
import Header from './Header';
import Placeholder from './Placeholder';
import TokenCard from './TokenCard';
export {
AccountCard,
AccountHeader,
AddressShort,
Card,
FormField,
Header,
Placeholder,
TokenCard
};
export * from './AccountCard';
export * from './AccountHeader';
export * from './AddressShort';
export * from './Card';
export * from './FormField';
export * from './Header';
export * from './Placeholder';
export * from './TokenCard';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment