Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
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
8 changes: 5 additions & 3 deletions src/component/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,24 @@ const namedStyles = StyleSheet.create({
color: color.blackText,
fontSize: font.sizeM,
lineHeight: font.lineHeightM + 2 * 12,
marginRight: 10,
marginRight: 15,
},
text: {
flex: 1,
textAlign: 'right',
fontFamily: 'OpenSans Light',
fontSize: font.sizeM,
lineHeight: font.lineHeightM + 2 * 12,
color: color.blackText,
opacity: 0.5,
},
});

export const NamedField = ({ name, children, style }) => (
<View style={[namedStyles.content, style]}>
<Text style={namedStyles.name}>{name}</Text>
<Text style={namedStyles.text}>{children}</Text>
<Text style={namedStyles.text} numberOfLines={1}>
{children}
</Text>
</View>
);

Expand Down
14 changes: 10 additions & 4 deletions src/view/pay-lightning-confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Header, Title } from '../component/header';
import { CancelButton, BackButton, PillButton } from '../component/button';
import Card from '../component/card';
import Icon from '../component/icon';
import { FormStretcher, FormText } from '../component/form';
import { FormStretcher } from '../component/form';
import {
BalanceLabel,
BalanceLabelNumeral,
Expand All @@ -34,6 +34,10 @@ const styles = StyleSheet.create({
totalLbl: {
marginTop: 5,
},
note: {
marginTop: 5,
borderBottomWidth: 0,
},
confirmBtn: {
marginTop: 20,
},
Expand All @@ -50,9 +54,6 @@ const PayLightningConfirmView = ({ store, nav, payment }) => (
</Header>
<MainContent>
<Card>
<FormText style={styles.description}>
You are about to send a Bitcoin payment over the Lightning Network.
</FormText>
<FormStretcher>
<BalanceLabel style={styles.balance}>
<BalanceLabelNumeral style={styles.numeral}>
Expand All @@ -68,6 +69,11 @@ const PayLightningConfirmView = ({ store, nav, payment }) => (
<NamedField name="Total" style={styles.totalLbl}>
{store.paymentTotalLabel} {store.unit}
</NamedField>
{store.payment.note ? (
<NamedField name="Note" style={styles.note}>
{store.payment.note}
</NamedField>
) : null}
</FormStretcher>
<PillButton
style={styles.confirmBtn}
Expand Down
1 change: 1 addition & 0 deletions stories/screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ store.payments = [...Array(10)].map(() => ({
status: 'complete',
date: new Date(),
}));
store.payment.note = '#craefulgang';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this so that the storybook shows a note

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

store.selectedTransaction = (store.computedTransactions || []).find(
tx => tx.type === 'bitcoin'
);
Expand Down