2017-09-25 02:06:28 +00:00
|
|
|
import { PaperWallet } from 'components';
|
|
|
|
import PrivKeyWallet from 'libs/wallet/privkey';
|
2017-07-16 21:02:13 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import translate from 'translations';
|
|
|
|
import printElement from 'utils/printElement';
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
interface Props {
|
|
|
|
wallet: PrivKeyWallet;
|
|
|
|
}
|
2017-07-16 21:02:13 +00:00
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
export default class PrintableWallet extends Component<Props, {}> {
|
|
|
|
public print = () => {
|
2017-07-16 21:02:13 +00:00
|
|
|
printElement(<PaperWallet wallet={this.props.wallet} />, {
|
|
|
|
popupFeatures: {
|
|
|
|
scrollbars: 'no'
|
|
|
|
},
|
|
|
|
styles: `
|
|
|
|
* {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
font-family: Lato, sans-serif;
|
|
|
|
font-size: 1rem;
|
|
|
|
line-height: 1.4;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public render() {
|
2017-07-16 21:02:13 +00:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<PaperWallet wallet={this.props.wallet} />
|
|
|
|
<a
|
|
|
|
role="button"
|
|
|
|
aria-label={translate('x_Print')}
|
|
|
|
aria-describedby="x_PrintDesc"
|
|
|
|
className={'btn btn-lg btn-primary'}
|
|
|
|
onClick={this.print}
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
style={{ marginTop: 10 }}
|
2017-07-16 21:02:13 +00:00
|
|
|
>
|
|
|
|
{translate('x_Print')}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|