/* @flow */
import * as React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { Icon, Tooltip, icons as ICONS, colors } from 'trezor-ui-components';
import { LEFT_NAVIGATION_ROW } from 'config/variables';
import Row from '../../../Row';
import l10nMessages from '../../index.messages';
const RowAddAccountWrapper = styled.div`
width: 100%;
padding: ${LEFT_NAVIGATION_ROW.PADDING};
display: flex;
align-items: center;
color: ${colors.TEXT_SECONDARY};
&:hover {
cursor: ${props => (props.disabled ? 'default' : 'pointer')};
color: ${props => (props.disabled ? colors.TEXT_SECONDARY : colors.TEXT_PRIMARY)};
}
`;
const AddAccountIconWrapper = styled.div`
margin-right: 12px;
`;
type Props = {
onClick?: () => any,
tooltipContent?: React.Node,
disabled?: boolean,
};
const AddAccountButton = ({ onClick, tooltipContent, disabled }: Props) => {
const ButtonRow = (
);
if (tooltipContent) {
return (
{ButtonRow}
);
}
return ButtonRow;
};
export default AddAccountButton;
AddAccountButton.propTypes = {
onClick: PropTypes.func,
className: PropTypes.string,
tooltipContent: PropTypes.node,
disabled: PropTypes.bool,
};